使用 qcow2 映像时无法创建 Cinder 卷。 Openstack/Packstack
Cinder volumes fail to create when using a qcow2 image. Openstack/Packstack
我们正在使用带有 NFS 的 Openstack-Train 的 packstack 安装作为 Cinder 的后端驱动程序。
我们无法使用从 cinder 卷构建的 qcow2 映像创建 VM。
Message Build of instance 8056996a-487c-4730-9ee0-f55dbf2fc320
aborted: Volume 7506ee68-6c9f-427c-bb37-ab6213de1b8e did not finish
being created even after we waited 80 seconds or 27 attempts. And its
status is error. Code 500 Details Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line
2168, in _do_build_and_run_instance filter_properties, request_spec)
File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line
2478, in build_and_run_instance bdms=block_device_mapping, tb=tb)
File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line
220, in exit self.force_reraise() File
"/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196,
in force_reraise six.reraise(self.type, self.value, self.tb) File
"/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2428,
in _build_and_run_instance request_group_resource_providers_mapping)
as resources: File "/usr/lib64/python2.7/contextlib.py", line 17, in
enter return self.gen.next() File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2656,
in _build_resources reason=e.format_message()) BuildAbortException:
Build of instance 8056996a-487c-4730-9ee0-f55dbf2fc320 aborted: Volume
7506ee68-6c9f-427c-bb37-ab6213de1b8e did not finish being created even
after we waited 80 seconds or 27 attempts. And its status is error.
Created Aug. 25, 2021, 7:15 a.m.
以下是 cinder.conf
中的关键配置
[nfs]
nfs_shares_config = /etc/cinder/nfs_shares.txt
volume_driver = cinder.volume.drivers.nfs.NfsDriver
volume_backend_name = nfsbackend
nfs_mount_options = rw
default_volume_type=nfstype
enabled_backends=nfs
nfs_qcow2_volumes = true
nfs_snapshot_support = false
这个问题的奇怪之处在于,当我们从头开始重建 Openstack 时,可以使用这些相同的 qcow2 映像,但是,在新设置上创建的任何映像仍然存在相同的问题。
由于大小限制,我无法 post 整个 cinder.conf 或日志文件。如果我可以 post 以其他方式实现,请告诉我。
通过在 cinder.conf 文件 (/etc/cinder/cinder.conf) 中设置以下参数设法解决此问题:
verify_glance_signatures = disabled
事实证明,Cinder 无法验证在 Glance 中创建的图像的元数据。将此参数设置为禁用将解决您将创建的任何较新图像上的错误。
要解决现有图像上的问题,请使用以下命令:
openstack image unset --property signature_verified "id of the glance image"
要允许 NFS 卷的快照,请使用以下参数:
nas_secure_file_operations = 假
重新启动 cinder 服务:
- openstack-cinder-api
- openstack-cinder-scheduler
- openstack-cinder-volume
如果您在加载 RAW 图像时遇到问题,请尝试 nova.conf 文件 (/etc/nova/nova.conf) 中的以下参数:
block_device_allocate_retries=400
block_device_allocate_retries_interval=3
这将允许 nova 创建大型卷。
重新启动 Nova 服务:
- openstack-nova-compute
- openstack-nova-scheduler
- openstack-nova-conductor
我们正在使用带有 NFS 的 Openstack-Train 的 packstack 安装作为 Cinder 的后端驱动程序。
我们无法使用从 cinder 卷构建的 qcow2 映像创建 VM。
Message Build of instance 8056996a-487c-4730-9ee0-f55dbf2fc320 aborted: Volume 7506ee68-6c9f-427c-bb37-ab6213de1b8e did not finish being created even after we waited 80 seconds or 27 attempts. And its status is error. Code 500 Details Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2168, in _do_build_and_run_instance filter_properties, request_spec) File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2478, in build_and_run_instance bdms=block_device_mapping, tb=tb) File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in exit self.force_reraise() File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type, self.value, self.tb) File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2428, in _build_and_run_instance request_group_resource_providers_mapping) as resources: File "/usr/lib64/python2.7/contextlib.py", line 17, in enter return self.gen.next() File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2656, in _build_resources reason=e.format_message()) BuildAbortException: Build of instance 8056996a-487c-4730-9ee0-f55dbf2fc320 aborted: Volume 7506ee68-6c9f-427c-bb37-ab6213de1b8e did not finish being created even after we waited 80 seconds or 27 attempts. And its status is error. Created Aug. 25, 2021, 7:15 a.m.
以下是 cinder.conf
中的关键配置[nfs]
nfs_shares_config = /etc/cinder/nfs_shares.txt
volume_driver = cinder.volume.drivers.nfs.NfsDriver
volume_backend_name = nfsbackend
nfs_mount_options = rw
default_volume_type=nfstype
enabled_backends=nfs
nfs_qcow2_volumes = true
nfs_snapshot_support = false
这个问题的奇怪之处在于,当我们从头开始重建 Openstack 时,可以使用这些相同的 qcow2 映像,但是,在新设置上创建的任何映像仍然存在相同的问题。
由于大小限制,我无法 post 整个 cinder.conf 或日志文件。如果我可以 post 以其他方式实现,请告诉我。
通过在 cinder.conf 文件 (/etc/cinder/cinder.conf) 中设置以下参数设法解决此问题:
verify_glance_signatures = disabled
事实证明,Cinder 无法验证在 Glance 中创建的图像的元数据。将此参数设置为禁用将解决您将创建的任何较新图像上的错误。
要解决现有图像上的问题,请使用以下命令:
openstack image unset --property signature_verified "id of the glance image"
要允许 NFS 卷的快照,请使用以下参数:
nas_secure_file_operations = 假
重新启动 cinder 服务:
- openstack-cinder-api
- openstack-cinder-scheduler
- openstack-cinder-volume
如果您在加载 RAW 图像时遇到问题,请尝试 nova.conf 文件 (/etc/nova/nova.conf) 中的以下参数:
block_device_allocate_retries=400
block_device_allocate_retries_interval=3
这将允许 nova 创建大型卷。
重新启动 Nova 服务:
- openstack-nova-compute
- openstack-nova-scheduler
- openstack-nova-conductor