Bug 2004316
| Summary: | When adding a qcow2 image to a cinder backed glance_store, the incremental volume extend is broken | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Cyril Roelandt <cyril> |
| Component: | python-glance-store | Assignee: | Cyril Roelandt <cyril> |
| Status: | CLOSED ERRATA | QA Contact: | Tzach Shefi <tshefi> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 16.2 (Train) | CC: | apevec, gfidente, lhh, rdhasman, tshefi |
| Target Milestone: | z2 | Keywords: | Triaged |
| Target Release: | 16.2 (Train on RHEL 8.4) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python-glance-store-1.0.2-2.20220111043147.79e043a | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-03-23 22:11:40 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 2008993, 2037034, 2037035 | ||
| Bug Blocks: | |||
|
Description
Cyril Roelandt
2021-09-15 02:00:12 UTC
*** Bug 2009278 has been marked as a duplicate of this bug. *** Verified on:
python3-glance-store-1.0.2-2.20220111043148.el8ost.noarch
On a deployment with Glance over Cinder over Netapp NFS.
Left Cinder's default raw volumes,
Using this large image:
(overcloud) [stack@undercloud-0 ~]$ qemu-img info windows_server_2012_r2_standard_eval_kvm_20170321.qcow2
image: windows_server_2012_r2_standard_eval_kvm_20170321.qcow2
file format: qcow2
virtual size: 12.2 GiB (13096714240 bytes)
disk size: 11.2 GiB
cluster_size: 65536
Format specific information:
compat: 0.10
compression type: zlib
refcount bits: 16
First attempt, lets upload to glance as a qcow2
(overcloud) [stack@undercloud-0 ~]$ glance image-create --name Windows.qcow2 --disk-format qcow2 --container-format bare --file windows_server_2012_r2_standard_eval_kvm_20170321.qcow2 --progress
[=============================>] 100%
+------------------+----------------------------------------------------------------------------------+
| Property | Value |
+------------------+----------------------------------------------------------------------------------+
| checksum | a05ead3a04ae663da77eee5d2cb2fa73 |
| container_format | bare |
| created_at | 2022-02-15T09:21:40Z |
| direct_url | cinder://f8eee30c-a120-4115-af35-22b984f9fec9 |
| disk_format | qcow2 |
| id | 3d8b315d-24b4-4ad9-90e3-b40031a07658 |
| min_disk | 0 |
| min_ram | 0 |
| name | Windows.qcow2 |
| os_hash_algo | sha512 |
| os_hash_value | 9bd12698b1cb46e09243fd5704e14292e7393c84a4de178f536caaf21b9222c94d5080cbec69eafe |
| | 69fd7a7694fe14d792425c5fbb89a89727d2d2615e62890a |
| os_hidden | False |
| owner | 9f5853b196334a2cba5b83259839ee4e |
| protected | False |
| size | 12001017856 |
| status | active |
| stores | default_backend |
| tags | [] |
| updated_at | 2022-02-15T09:25:14Z |
| virtual_size | Not available |
| visibility | shared |
+------------------+----------------------------------------------------------------------------------+
Great image uploaded successfully, due to the large disk size of 11.2 GiB, which is way larger than the default 1 GiB inital volume size
we expected and as shown below on log indeed had to extend/resize the backing Cinder volume.
Cinder volume log reports several resize cycles:
root@controller-2 cinder]# grep -irn resize cinder-volume.log
8:2022-02-15 09:22:28.623 49 DEBUG cinder.volume.drivers.netapp.dataontap.nfs_base [req-fb25f512-701c-4c9b-9d86-241ce7f51bc3 b51a3e29083d4c2c80ce923e2a4bf928 32b79a86720d4031a4d559e3735f8957 - default default] Checking file for resize _resize_image_file /usr/lib/python3.6/site-packages/cinder/volume/drivers/netapp/dataontap/nfs_base.py:651
72:2022-02-15 09:22:33.737 49 DEBUG oslo_concurrency.processutils [req-fb25f512-701c-4c9b-9d86-241ce7f51bc3 b51a3e29083d4c2c80ce923e2a4bf928 32b79a86720d4031a4d559e3735f8957 - default default] Running cmd (subprocess): qemu-img resize -f raw /var/lib/cinder/mnt/de7de858b94dc496d8c1a0c52a2c79a8/volume-f8eee30c-a120-4115-af35-22b984f9fec9 2G execute /usr/lib/python3.6/site-packages/oslo_concurrency/processutils.py:379
73:2022-02-15 09:22:33.758 49 DEBUG oslo_concurrency.processutils [req-fb25f512-701c-4c9b-9d86-241ce7f51bc3 b51a3e29083d4c2c80ce923e2a4bf928 32b79a86720d4031a4d559e3735f8957 - default default] CMD "qemu-img resize -f raw /var/lib/cinder/mnt/de7de858b94dc496d8c1a0c52a2c79a8/volume-f8eee30c-a120-4115-af35-22b984f9fec9 2G" returned: 0 in 0.021s execute /usr/lib/python3.6/site-packages/oslo_concurrency/processutils.py:416
...
240:2022-02-15 09:24:36.416 49 DEBUG oslo_concurrency.processutils [req-d92ba8b2-45a1-45c7-a5cb-5999138ad0e7 b51a3e29083d4c2c80ce923e2a4bf928 32b79a86720d4031a4d559e3735f8957 - default default] CMD "qemu-img resize -f raw /var/lib/cinder/mnt/de7de858b94dc496d8c1a0c52a2c79a8/volume-f8eee30c-a120-4115-af35-22b984f9fec9 10G" returned: 0 in 0.018s execute /usr/lib/python3.6/site-packages/oslo_concurrency/processutils.py:416
We can see the Cinder backing file
(overcloud) [stack@undercloud-0 ~]$ cinder list --all
+--------------------------------------+----------------------------------+-----------+--------------------------------------------+------+-------------+----------+--------------------------------------+
| ID | Tenant ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+----------------------------------+-----------+--------------------------------------------+------+-------------+----------+--------------------------------------+
| f8eee30c-a120-4115-af35-22b984f9fec9 | 32b79a86720d4031a4d559e3735f8957 | available | image-3d8b315d-24b4-4ad9-90e3-b40031a07658 | 12 | tripleo | false | |
(overcloud) [stack@undercloud-0 ~]$ cinder show f8eee30c-a120-4115-af35-22b984f9fec9
+--------------------------------+--------------------------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------------------------+
| attached_servers | [] |
| attachment_ids | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2022-02-15T09:21:41.000000 |
| description | None |
| encrypted | False |
| id | f8eee30c-a120-4115-af35-22b984f9fec9 |
| metadata | glance_image_id : 3d8b315d-24b4-4ad9-90e3-b40031a07658 |
| | image_owner : 9f5853b196334a2cba5b83259839ee4e |
| | image_size : 12001017856 |
| | readonly : True |
| migration_status | None |
| multiattach | False |
| name | image-3d8b315d-24b4-4ad9-90e3-b40031a07658 |
| os-vol-host-attr:host | hostgroup@tripleo_netapp_nfs#10.46.29.88:/cinder_nfs |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 32b79a86720d4031a4d559e3735f8957 |
| readonly | True |
| replication_status | None |
| size | 12 | -> the volume size was extended from it's initial 1GiB to it's final 12GiB size.
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2022-02-15T09:25:14.000000 |
| user_id | b51a3e29083d4c2c80ce923e2a4bf928 |
| volume_type | tripleo |
+--------------------------------+--------------------------------------------------------+
I know the bug is about qcow2,
but I already have this large source image,
lets retest with a raw source image just for fun.
qemu-img convert -f qcow2 -O raw windows_server_2012_r2_standard_eval_kvm_20170321.qcow2 windows_server_2012_r2_standard_eval_kvm_20170321.raw
Upload to Glance
(overcloud) [stack@undercloud-0 ~]$ glance image-create --name Windows.raw --disk-format raw --container-format bare --file windows_server_2012_r2_standard_eval_kvm_20170321.raw --progress
[=============================>] 100%
+------------------+----------------------------------------------------------------------------------+
| Property | Value |
+------------------+----------------------------------------------------------------------------------+
| checksum | ff159818151720930f5790aa65a36f06 |
| container_format | bare |
| created_at | 2022-02-15T09:39:52Z |
| direct_url | cinder://cfb45e30-bc87-499b-b71c-0e4a9e7e7cb6 |
| disk_format | raw |
| id | 14db9402-e71f-4cfb-9d9e-f43335552175 |
| min_disk | 0 |
| min_ram | 0 |
| name | Windows.raw |
| os_hash_algo | sha512 |
| os_hash_value | daff8b086e029322a410345f104e2cbaafd61e248827400d123c3dfe983f5890b5633d9dcc06eba5 |
| | 9fc74c3eaacc047148c5c31c594a2db55c8712efae244555 |
| os_hidden | False |
| owner | 9f5853b196334a2cba5b83259839ee4e |
| protected | False |
| size | 13096714240 |
| status | active |
| stores | default_backend |
| tags | [] |
| updated_at | 2022-02-15T09:43:40Z |
| virtual_size | Not available |
| visibility | shared |
+------------------+----------------------------------------------------------------------------------+
Again on Cinder volume log we see the extend resize commands as expected.
root@controller-2 cinder]# grep -irn resize cinder-volume.log
53:2022-02-15 09:40:39.237 49 DEBUG cinder.volume.drivers.netapp.dataontap.nfs_base [req-2ce656bc-edbf-47c5-978c-dbe080980cdf b51a3e29083d4c2c80ce923e2a4bf928 32b79a86720d4031a4d559e3735f8957 - default default] Checking file for resize _resize_image_file /usr/lib/python3.6/site-packages/cinder/volume/drivers/netapp/dataontap/nfs_base.py:651
57:2022-02-15 09:40:44.372 49 DEBUG oslo_concurrency.processutils [req-2ce656bc-edbf-47c5-978c-dbe080980cdf b51a3e29083d4c2c80ce923e2a4bf928 32b79a86720d4031a4d559e3735f8957 - default default] Running cmd (subprocess): qemu-img resize -f raw /var/lib/cinder/mnt/de7de858b94dc496d8c1a0c52a2c79a8/volume-cfb45e30-bc87-499b-b71c-0e4a9e7e7cb6 2G execute /usr/lib/python3.6/site-packages/oslo_concurrency/processutils.py:379
58:2022-02-15 09:40:44.407 49 DEBUG oslo_concurrency.processutils [req-2ce656bc-edbf-47c5-978c-dbe080980cdf b51a3e29083d4c2c80ce923e2a4bf928 32b79a86720d4031a4d559e3735f8957 - default default] CMD "qemu-img resize -f raw /var/lib/cinder/mnt/de7de858b94dc496d8c1a0c52a2c79a8/volume-cfb45e30-bc87-499b-b71c-0e4a9e7e7cb6 2G" returned: 0 in 0.035s execute /usr/lib/python3.6/site-packages/oslo_concurrency/processutils.py:416
...
269:2022-02-15 09:43:17.467 49 DEBUG oslo_concurrency.processutils [req-281704b6-716c-4e57-9794-279748ee26db b51a3e29083d4c2c80ce923e2a4bf928 32b79a86720d4031a4d559e3735f8957 - default default] CMD "qemu-img resize -f raw /var/lib/cinder/mnt/de7de858b94dc496d8c1a0c52a2c79a8/volume-cfb45e30-bc87-499b-b71c-0e4a9e7e7cb6 12G" returned: 0 in 0.026s execute /usr/lib/python3.6/site-packages/oslo_concurrency/processutils.py:416
283:2022-02-15 09:43:32.178 49 DEBUG cinder.volume.drivers.netapp.dataontap.nfs_base [req-e1564fa8-8701-44ce-909f-3a8dde1c223b b51a3e29083d4c2c80ce923e2a4bf928 32b79a86720d4031a4d559e3735f8957 - default default] Checking file for resize _resize_image_file /usr/lib/python3.6/site-packages/cinder/volume/drivers/netapp/dataontap/nfs_base.py:651
287:2022-02-15 09:43:32.267 49 DEBUG oslo_concurrency.processutils [req-e1564fa8-8701-44ce-909f-3a8dde1c223b b51a3e29083d4c2c80ce923e2a4bf928 32b79a86720d4031a4d559e3735f8957 - default default] Running cmd (subprocess): qemu-img resize -f raw /var/lib/cinder/mnt/de7de858b94dc496d8c1a0c52a2c79a8/volume-cfb45e30-bc87-499b-b71c-0e4a9e7e7cb6 13G execute /usr/lib/python3.6/site-packages/oslo_concurrency/processutils.py:379
288:2022-02-15 09:43:32.286 49 DEBUG oslo_concurrency.processutils [req-e1564fa8-8701-44ce-909f-3a8dde1c223b b51a3e29083d4c2c80ce923e2a4bf928 32b79a86720d4031a4d559e3735f8957 - default default] CMD "qemu-img resize -f raw /var/lib/cinder/mnt/de7de858b94dc496d8c1a0c52a2c79a8/volume-cfb45e30-bc87-499b-b71c-0e4a9e7e7cb6 13G" returned: 0 in 0.019s execute /usr/lib/python3.6/site-packages/oslo_concurrency/processutils.py:416
As we noticed above extend is no longer broken and works with both qcwo2 and raw, thus good to verify.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Release of components for Red Hat OpenStack Platform 16.2.2), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:1001 |