在运行 14.04 的多节点 Kilo Openstack 上,我无法将 Cinder 卷附加到实例。以下是我采取的步骤:
1- 创建 100G 环回设备,
$ sudo losetup -a
/dev/loop0: [0801]:35136386 (/var/lib/cinder/volumes/vol1.img)
2-创建分区并将其附加到 cinder-volumes:
# pvdisplay
--- Physical volume ---
PV Name /dev/loop0
VG Name cinder-volumes
PV Size 100.00 GiB / not usable 4.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 25599
Free PE 24319
Allocated PE 1280
PV UUID gzJ2HD-oPtg-HrR4-qTnA-OMzQ-Ja1J-n2Zlh
vgdisplay
--- Volume group ---
VG Name cinder-volumes
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 100.00 GiB
PE Size 4.00 MiB
Total PE 25599
Alloc PE / Size 1280 / 5.00 GiB
Free PE / Size 24319 / 95.00 GiB
VG UUID CKhy2J-zCFG-tJ2W-OD3y-FvbQ-Cf17-vSXY7K
3-创建5G卷
# cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| 6b50b07b-79b6-4733-9049-531b5d68dae5 | available | v5 | 5 | None | false | |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
4-尝试通过 Horizon 将其附加到正在运行的实例,以下是我从 Cinder 日志文件中获得的内容:
2015-06-19 22:10:24.847 13448 WARNING cinder.volume.targets.tgt [req-bac379f3-dc20-46b5-88d8-e0dbd1b9585e fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] Persistence file already exists for volume, found file at: /var/lib/cinder/volumes/volume-6b50b07b-79b6-4733-9049-531b5d68dae5
2015-06-19 22:10:58.293 13448 WARNING cinder.volume.targets.tgt [req-0d69211a-b4f3-420c-88a5-1cd47c5eedd4 fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] Persistence file already exists for volume, found file at: /var/lib/cinder/volumes/volume-6b50b07b-79b6-4733-9049-531b5d68dae5
2015-06-19 22:11:39.186 13448 WARNING cinder.volume.targets.tgt [req-e1adf523-0024-4890-a8c5-f4d240f8a147 fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] Persistence file already exists for volume, found file at: /var/lib/cinder/volumes/volume-6b50b07b-79b6-4733-9049-531b5d68dae5
2015-06-19 22:13:07.342 13448 ERROR cinder.volume.targets.tgt [req-bac379f3-dc20-46b5-88d8-e0dbd1b9585e fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] Failed to create iscsi target for Volume ID: volume-6b50b07b-79b6-4733-9049-531b5d68dae5: Unexpected error while running command.
Command: None
Exit code: -
Stdout: u"Unexpected error while running command.\nCommand: sudo cinder-rootwrap /etc/cinder/rootwrap.conf tgt-admin --update iqn.2010-10.org.openstack:volume-6b50b07b-79b6-4733-9049-531b5d68dae5\nExit code: 1\nStdout: u''\nStderr: u'Out of memory!\\n'"
Stderr: None
2015-06-19 22:13:07.608 13448 ERROR cinder.volume.manager [req-bac379f3-dc20-46b5-88d8-e0dbd1b9585e fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] Unable to create export for volume 6b50b07b-79b6-4733-9049-531b5d68dae5
2015-06-19 22:13:07.608 13448 TRACE cinder.volume.manager Traceback (most recent call last):
2015-06-19 22:13:07.608 13448 TRACE cinder.volume.manager File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 1084, in initialize_connection
2015-06-19 22:13:07.608 13448 TRACE cinder.volume.manager volume)
2015-06-19 22:13:07.608 13448 TRACE cinder.volume.manager File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper
2015-06-19 22:13:07.608 13448 TRACE cinder.volume.manager return f(*args, **kwargs)
2015-06-19 22:13:07.608 13448 TRACE cinder.volume.manager File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line 606, in create_export
2015-06-19 22:13:07.608 13448 TRACE cinder.volume.manager volume_path)
2015-06-19 22:13:07.608 13448 TRACE cinder.volume.manager File "/usr/lib/python2.7/dist-packages/cinder/volume/targets/iscsi.py", line 208, in create_export
2015-06-19 22:13:07.608 13448 TRACE cinder.volume.manager chap_auth)
2015-06-19 22:13:07.608 13448 TRACE cinder.volume.manager File "/usr/lib/python2.7/dist-packages/cinder/volume/targets/tgt.py", line 233, in create_iscsi_target
2015-06-19 22:13:07.608 13448 TRACE cinder.volume.manager raise exception.ISCSITargetCreateFailed(volume_id=vol_id)
2015-06-19 22:13:07.608 13448 TRACE cinder.volume.manager ISCSITargetCreateFailed: Failed to create iscsi target for volume volume-6b50b07b-79b6-4733-9049-531b5d68dae5.
2015-06-19 22:13:07.608 13448 TRACE cinder.volume.manager
2015-06-19 22:13:08.295 13448 ERROR oslo_messaging.rpc.dispatcher [req-bac379f3-dc20-46b5-88d8-e0dbd1b9585e fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] Exception during message handling: Bad or unexpected response from the storage volume backend API: Unable to create export for volume 6b50b07b-79b6-4733-9049-531b5d68dae5
2015-06-19 22:13:08.295 13448 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-06-19 22:13:08.295 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-06-19 22:13:08.295 13448 TRACE oslo_messaging.rpc.dispatcher executor_callback))
2015-06-19 22:13:08.295 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-06-19 22:13:08.295 13448 TRACE oslo_messaging.rpc.dispatcher executor_callback)
2015-06-19 22:13:08.295 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
2015-06-19 22:13:08.295 13448 TRACE oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-06-19 22:13:08.295 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper
2015-06-19 22:13:08.295 13448 TRACE oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-06-19 22:13:08.295 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 1089, in initialize_connection
2015-06-19 22:13:08.295 13448 TRACE oslo_messaging.rpc.dispatcher raise exception.VolumeBackendAPIException(data=err_msg)
2015-06-19 22:13:08.295 13448 TRACE oslo_messaging.rpc.dispatcher VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: Unable to create export for volume 6b50b07b-79b6-4733-9049-531b5d68dae5
2015-06-19 22:13:08.295 13448 TRACE oslo_messaging.rpc.dispatcher
2015-06-19 22:13:08.423 13448 ERROR oslo_messaging._drivers.common [req-bac379f3-dc20-46b5-88d8-e0dbd1b9585e fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] Returning exception Bad or unexpected response from the storage volume backend API: Unable to create export for volume 6b50b07b-79b6-4733-9049-531b5d68dae5 to caller
2015-06-19 22:13:08.423 13448 ERROR oslo_messaging._drivers.common [req-bac379f3-dc20-46b5-88d8-e0dbd1b9585e fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply\n executor_callback))\n', ' File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch\n executor_callback)\n', ' File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch\n result = func(ctxt, **new_args)\n', ' File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper\n return f(*args, **kwargs)\n', ' File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 1089, in initialize_connection\n raise exception.VolumeBackendAPIException(data=err_msg)\n', 'VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: Unable to create export for volume 6b50b07b-79b6-4733-9049-531b5d68dae5\n']
2015-06-19 22:13:30.416 13448 ERROR cinder.volume.targets.tgt [req-d54a6f35-8af9-4464-81f7-c533d7791bb6 fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] Failed to create iscsi target for Volume ID: volume-6b50b07b-79b6-4733-9049-531b5d68dae5: Unexpected error while running command.
Command: None
Exit code: -
Stdout: u"Unexpected error while running command.\nCommand: sudo cinder-rootwrap /etc/cinder/rootwrap.conf tgt-admin --update iqn.2010-10.org.openstack:volume-6b50b07b-79b6-4733-9049-531b5d68dae5\nExit code: 137\nStdout: u''\nStderr: u''"
Stderr: None
2015-06-19 22:13:30.566 13448 ERROR oslo_messaging.rpc.dispatcher [req-d54a6f35-8af9-4464-81f7-c533d7791bb6 fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] Exception during message handling: [Errno 2] No such file or directory: '/var/lib/cinder/volumes/volume-6b50b07b-79b6-4733-9049-531b5d68dae5'
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher executor_callback))
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher executor_callback)
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 1084, in initialize_connection
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher volume)
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line 606, in create_export
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher volume_path)
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/targets/iscsi.py", line 208, in create_export
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher chap_auth)
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/targets/tgt.py", line 232, in create_iscsi_target
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher os.unlink(volume_path)
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher OSError: [Errno 2] No such file or directory: '/var/lib/cinder/volumes/volume-6b50b07b-79b6-4733-9049-531b5d68dae5'
2015-06-19 22:13:30.566 13448 TRACE oslo_messaging.rpc.dispatcher
2015-06-19 22:13:30.567 13448 ERROR oslo_messaging._drivers.common [req-d54a6f35-8af9-4464-81f7-c533d7791bb6 fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] Returning exception [Errno 2] No such file or directory: '/var/lib/cinder/volumes/volume-6b50b07b-79b6-4733-9049-531b5d68dae5' to caller
2015-06-19 22:13:30.568 13448 ERROR oslo_messaging._drivers.common [req-d54a6f35-8af9-4464-81f7-c533d7791bb6 fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply\n executor_callback))\n', ' File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch\n executor_callback)\n', ' File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch\n result = func(ctxt, **new_args)\n', ' File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper\n return f(*args, **kwargs)\n', ' File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 1084, in initialize_connection\n volume)\n', ' File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper\n return f(*args, **kwargs)\n', ' File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line 606, in create_export\n volume_path)\n', ' File "/usr/lib/python2.7/dist-packages/cinder/volume/targets/iscsi.py", line 208, in create_export\n chap_auth)\n', ' File "/usr/lib/python2.7/dist-packages/cinder/volume/targets/tgt.py", line 232, in create_iscsi_target\n os.unlink(volume_path)\n', "OSError: [Errno 2] No such file or directory: '/var/lib/cinder/volumes/volume-6b50b07b-79b6-4733-9049-531b5d68dae5'\n"]
2015-06-19 22:14:00.531 13448 ERROR cinder.volume.targets.tgt [req-e1adf523-0024-4890-a8c5-f4d240f8a147 fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] Failed to create iscsi target for Volume ID: volume-6b50b07b-79b6-4733-9049-531b5d68dae5: Unexpected error while running command.
Command: None
Exit code: -
Stdout: u"Unexpected error while running command.\nCommand: sudo cinder-rootwrap /etc/cinder/rootwrap.conf tgt-admin --update iqn.2010-10.org.openstack:volume-6b50b07b-79b6-4733-9049-531b5d68dae5\nExit code: 1\nStdout: u''\nStderr: u'Out of memory!\\n'"
Stderr: None
2015-06-19 22:14:00.536 13448 ERROR oslo_messaging.rpc.dispatcher [req-e1adf523-0024-4890-a8c5-f4d240f8a147 fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] Exception during message handling: [Errno 2] No such file or directory: '/var/lib/cinder/volumes/volume-6b50b07b-79b6-4733-9049-531b5d68dae5'
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher executor_callback))
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher executor_callback)
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 1084, in initialize_connection
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher volume)
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line 606, in create_export
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher volume_path)
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/targets/iscsi.py", line 208, in create_export
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher chap_auth)
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/targets/tgt.py", line 232, in create_iscsi_target
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher os.unlink(volume_path)
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher OSError: [Errno 2] No such file or directory: '/var/lib/cinder/volumes/volume-6b50b07b-79b6-4733-9049-531b5d68dae5'
2015-06-19 22:14:00.536 13448 TRACE oslo_messaging.rpc.dispatcher
2015-06-19 22:14:00.552 13448 ERROR cinder.volume.targets.tgt [req-0d69211a-b4f3-420c-88a5-1cd47c5eedd4 fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] Failed to create iscsi target for Volume ID: volume-6b50b07b-79b6-4733-9049-531b5d68dae5: Unexpected error while running command.
Command: None
Exit code: -
Stdout: u"Unexpected error while running command.\nCommand: sudo cinder-rootwrap /etc/cinder/rootwrap.conf tgt-admin --update iqn.2010-10.org.openstack:volume-6b50b07b-79b6-4733-9049-531b5d68dae5\nExit code: 1\nStdout: u''\nStderr: u'Out of memory!\\n'"
Stderr: None
2015-06-19 22:14:00.555 13448 ERROR oslo_messaging.rpc.dispatcher [req-0d69211a-b4f3-420c-88a5-1cd47c5eedd4 fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] Exception during message handling: [Errno 2] No such file or directory: '/var/lib/cinder/volumes/volume-6b50b07b-79b6-4733-9049-531b5d68dae5'
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher executor_callback))
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher executor_callback)
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 1084, in initialize_connection
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher volume)
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line 606, in create_export
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher volume_path)
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/targets/iscsi.py", line 208, in create_export
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher chap_auth)
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/targets/tgt.py", line 232, in create_iscsi_target
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher os.unlink(volume_path)
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher OSError: [Errno 2] No such file or directory: '/var/lib/cinder/volumes/volume-6b50b07b-79b6-4733-9049-531b5d68dae5'
2015-06-19 22:14:00.555 13448 TRACE oslo_messaging.rpc.dispatcher
2015-06-19 22:14:00.696 13448 ERROR oslo_messaging._drivers.common [req-e1adf523-0024-4890-a8c5-f4d240f8a147 fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] Returning exception [Errno 2] No such file or directory: '/var/lib/cinder/volumes/volume-6b50b07b-79b6-4733-9049-531b5d68dae5' to caller
2015-06-19 22:14:00.703 13448 ERROR oslo_messaging._drivers.common [req-e1adf523-0024-4890-a8c5-f4d240f8a147 fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply\n executor_callback))\n', ' File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch\n executor_callback)\n', ' File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch\n result = func(ctxt, **new_args)\n', ' File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper\n return f(*args, **kwargs)\n', ' File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 1084, in initialize_connection\n volume)\n', ' File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper\n return f(*args, **kwargs)\n', ' File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line 606, in create_export\n volume_path)\n', ' File "/usr/lib/python2.7/dist-packages/cinder/volume/targets/iscsi.py", line 208, in create_export\n chap_auth)\n', ' File "/usr/lib/python2.7/dist-packages/cinder/volume/targets/tgt.py", line 232, in create_iscsi_target\n os.unlink(volume_path)\n', "OSError: [Errno 2] No such file or directory: '/var/lib/cinder/volumes/volume-6b50b07b-79b6-4733-9049-531b5d68dae5'\n"]
2015-06-19 22:14:00.705 13448 ERROR oslo_messaging._drivers.common [req-0d69211a-b4f3-420c-88a5-1cd47c5eedd4 fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] Returning exception [Errno 2] No such file or directory: '/var/lib/cinder/volumes/volume-6b50b07b-79b6-4733-9049-531b5d68dae5' to caller
2015-06-19 22:14:00.705 13448 ERROR oslo_messaging._drivers.common [req-0d69211a-b4f3-420c-88a5-1cd47c5eedd4 fcbce29fa1eb4b42921a20055afdc024 8f3633c4ba1640abbab3be608b6bcc88 - - -] ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply\n executor_callback))\n', ' File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch\n executor_callback)\n', ' File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch\n result = func(ctxt, **new_args)\n', ' File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper\n return f(*args, **kwargs)\n', ' File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 1084, in initialize_connection\n volume)\n', ' File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper\n return f(*args, **kwargs)\n', ' File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line 606, in create_export\n volume_path)\n', ' File "/usr/lib/python2.7/dist-packages/cinder/volume/targets/iscsi.py", line 208, in create_export\n chap_auth)\n', ' File "/usr/lib/python2.7/dist-packages/cinder/volume/targets/tgt.py", line 232, in create_iscsi_target\n os.unlink(volume_path)\n', "OSError: [Errno 2] No such file or directory: '/var/lib/cinder/volumes/volume-6b50b07b-79b6-4733-9049-531b5d68dae5'\n"]
有几件事很突出:
1-卷的持久文件已经存在...,这听起来像是时间问题
2-查看安装了 Cinder 的控制机器,tgt-admin,最初消耗了大量的 CPU 和内存:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
14622 root 20 0 26.158g 0.025t 2036 R 64.7 40.9 0:37.48 tgt-admin
15149 root 20 0 4627140 3.858g 2036 R 61.7 6.2 0:07.32 tgt-admin
138 root 20 0 0 0 0 S 16.5 0.0 3:05.25 kswapd0
,可能与此消息有关:Stdout: u"Unexpected error while running command.\nCommand: sudo cinder-rootwrap /etc/cinder/rootwrap.conf tgt-admin --update iqn.2010-10.org.openstack:volume-6b50b07b-79b6-4733-9049-531b5d68dae5\nExit code: 1\nStdout: u''\nStderr: u'Out of memory!\\n'"
这是我的 cinder.conf 文件:
###############################################################################
# [ WARNING ]
# cinder configuration file maintained by Juju
# local changes may be overwritten.
###############################################################################
[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
api_paste_confg = /etc/cinder/api-paste.ini
iscsi_helper = tgtadm
volume_name_template = volume-%s
volume_group = cinder-volumes
verbose = False
debug = False
use_syslog = False
auth_strategy = keystone
state_path = /var/lib/cinder
volumes_dir = /var/lib/cinder/volumes
osapi_volume_workers = 32
notification_driver = cinder.openstack.common.notifier.rpc_notifier
control_exchange = cinder
osapi_volume_listen = 0.0.0.0
osapi_volume_listen_port = 8766
glance_api_servers = http://10.4.0.58:9292
glance_api_version = 1
volume_clear = none
[keystone_authtoken]
identity_uri = http://10.4.0.61:35357/
auth_uri = http://10.4.0.61:5000/
admin_tenant_name = services
admin_user = cinder_cinderv2
admin_password = YNY8zpzJL77rZHcR3BJZZWV57xPBLcXhnghRNrxCN6S5tXyBq3LZwnZTHHdtpnqf
signing_dir = /var/cache/cinder
[database]
connection = mysql://cinder:[email protected]/cinder
[oslo_messaging_rabbit]
rabbit_userid = cinder
rabbit_virtual_host = openstack
rabbit_password = 7sgRdRjBqHzwZtqLBz22FmkCTSLGrGM7krfwwLm3sJz9NqJ4xfTC6Kx7ShbZBS8y
rabbit_host = 10.4.0.60
[oslo_concurrency]
lock_path = /var/lock/cinder
运行魅力版本charm: cs:trusty/cinder-23
有什么想法吗?
干杯,