Bug 2009039 - Fix: support format info for filesystem type drivers
Summary: Fix: support format info for filesystem type drivers
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z8
: 16.1 (Train on RHEL 8.2)
Assignee: Rajat Dhasmana
QA Contact: Tzach Shefi
URL:
Whiteboard:
Depends On: 1947283 2008993
Blocks: 2005966 2035472
TreeView+ depends on / blocked
 
Reported: 2021-09-29 18:28 UTC by Rajat Dhasmana
Modified: 2024-12-20 21:15 UTC (History)
7 users (show)

Fixed In Version: openstack-cinder-15.4.0-1.20220114193342.58f0e73.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2008993
Environment:
Last Closed: 2022-03-24 11:01:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-10035 0 None None None 2021-11-15 12:42:39 UTC
Red Hat Product Errata RHBA-2022:0986 0 None None None 2022-03-24 11:01:58 UTC

Description Rajat Dhasmana 2021-09-29 18:28:20 UTC
+++ This bug was initially created as a clone of Bug #2008993 +++

+++ This bug was initially created as a clone of Bug #1947283 +++

Currently filesystem type drivers (like nfs) rely on format auto-detection for operations like resize. This causes a problem when we write a qcow2 image file on a raw volume and the format is wrongly assumed to be qcow2 causing problems similar to[1].

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1838653

--- Additional comment from RHEL Program Management on 2021-04-21 09:17:18 UTC ---

This item has been properly Triaged and planned for the release, and Target Release is now set to match the release flag. For details, see https://mojo.redhat.com/docs/DOC-1195410

--- Additional comment from RHEL Program Management on 2021-09-29 16:16:33 UTC ---

This bugzilla has been removed from the release since it  does not have an acked release flag. For details, see https://mojo.redhat.com/docs/DOC-1144661#jive_content_id_OSP_Release_Planning.'

--- Additional comment from RHEL Program Management on 2021-09-29 16:17:00 UTC ---

This bugzilla has been removed from the release since it  does not have an acked release flag. For details, see https://mojo.redhat.com/docs/DOC-1144661#jive_content_id_OSP_Release_Planning.'

Comment 13 Tzach Shefi 2022-03-07 13:43:53 UTC
Verified on:
openstack-cinder-15.4.0-1.20220114193342.58f0e73.el8ost.noarch

On a deployment with Glance over Cinder over generic NFS.
Left Cinder's default raw volumes (nfs_qcow2_volumes = false). 

I booted up two instance:
(overcloud) [stack@undercloud-0 ~]$ nova list
+--------------------------------------+-------+--------+------------+-------------+-----------------------------------+
| ID                                   | Name  | Status | Task State | Power State | Networks                          |
+--------------------------------------+-------+--------+------------+-------------+-----------------------------------+
| 04d06e6d-e6d4-46fe-bc78-aac780abcde5 | inst1 | ACTIVE | -          | Running     | internal=192.168.0.26, 10.0.0.238 |
| 647fbcfb-c034-488c-b74a-d6f59655207d | inst2 | ACTIVE | -          | Running     | internal=192.168.0.24, 10.0.0.246 |
+--------------------------------------+-------+--------+------------+-------------+-----------------------------------+

Lets create two volumes, an empty volume followed by a volume from an image:
(overcloud) [stack@undercloud-0 ~]$ cinder create 2 --name EmptyVol
+--------------------------------+--------------------------------------+
| Property                       | Value                                |
+--------------------------------+--------------------------------------+
| attachments                    | []                                   |
| availability_zone              | nova                                 |
| bootable                       | false                                |
| consistencygroup_id            | None                                 |
| created_at                     | 2022-03-07T13:25:11.000000           |
| description                    | None                                 |
| encrypted                      | False                                |
| id                             | a6606b7c-660b-4446-b649-113de9cac0c1 |
| metadata                       | {}                                   |
| migration_status               | None                                 |
| multiattach                    | False                                |
| name                           | EmptyVol                             |
| os-vol-host-attr:host          | None                                 |
| os-vol-mig-status-attr:migstat | None                                 |
| os-vol-mig-status-attr:name_id | None                                 |
| os-vol-tenant-attr:tenant_id   | 1d0c7f0ebdbb454785e5506fa6e92295     |
| replication_status             | None                                 |
| size                           | 2                                    |
| snapshot_id                    | None                                 |
| source_volid                   | None                                 |
| status                         | creating                             |
| updated_at                     | None                                 |
| user_id                        | 0f74a44ac5e24ea08b27bddaedad7754     |
| volume_type                    | tripleo                              |
+--------------------------------+--------------------------------------+

(overcloud) [stack@undercloud-0 ~]$ cinder create 2 --name VolFromImage --image a68042cd-3fa4-41a7-896a-20671435cb75
+--------------------------------+--------------------------------------+
| Property                       | Value                                |
+--------------------------------+--------------------------------------+
| attachments                    | []                                   |
| availability_zone              | nova                                 |
| bootable                       | false                                |
| consistencygroup_id            | None                                 |
| created_at                     | 2022-03-07T13:25:46.000000           |
| description                    | None                                 |
| encrypted                      | False                                |
| id                             | e033f7c9-a132-4f17-bee3-6b43d450f0e5 |
| metadata                       | {}                                   |
| migration_status               | None                                 |
| multiattach                    | False                                |
| name                           | VolFromImage                         |
| os-vol-host-attr:host          | None                                 |
| os-vol-mig-status-attr:migstat | None                                 |
| os-vol-mig-status-attr:name_id | None                                 |
| os-vol-tenant-attr:tenant_id   | 1d0c7f0ebdbb454785e5506fa6e92295     |
| replication_status             | None                                 |
| size                           | 2                                    |
| snapshot_id                    | None                                 |
| source_volid                   | None                                 |
| status                         | creating                             |
| updated_at                     | None                                 |
| user_id                        | 0f74a44ac5e24ea08b27bddaedad7754     |
| volume_type                    | tripleo                              |
+--------------------------------+--------------------------------------+

(overcloud) [stack@undercloud-0 ~]$ cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| ID                                   | Status    | Name         | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| a6606b7c-660b-4446-b649-113de9cac0c1 | available | EmptyVol     | 2    | tripleo     | false    |             |
| e033f7c9-a132-4f17-bee3-6b43d450f0e5 | available | VolFromImage | 2    | tripleo     | true     |             |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+

Now lets attach each volume to an instance:
(overcloud) [stack@undercloud-0 ~]$ nova volume-attach inst1 a6606b7c-660b-4446-b649-113de9cac0c1
+-----------------------+--------------------------------------+
| Property              | Value                                |
+-----------------------+--------------------------------------+
| delete_on_termination | False                                |
| device                | /dev/vdb                             |
| id                    | a6606b7c-660b-4446-b649-113de9cac0c1 |
| serverId              | 04d06e6d-e6d4-46fe-bc78-aac780abcde5 |
| tag                   | -                                    |
| volumeId              | a6606b7c-660b-4446-b649-113de9cac0c1 |
+-----------------------+--------------------------------------+
(overcloud) [stack@undercloud-0 ~]$ nova volume-attach inst2 e033f7c9-a132-4f17-bee3-6b43d450f0e5
+-----------------------+--------------------------------------+
| Property              | Value                                |
+-----------------------+--------------------------------------+
| delete_on_termination | False                                |
| device                | /dev/vdb                             |
| id                    | e033f7c9-a132-4f17-bee3-6b43d450f0e5 |
| serverId              | 647fbcfb-c034-488c-b74a-d6f59655207d |
| tag                   | -                                    |
| volumeId              | e033f7c9-a132-4f17-bee3-6b43d450f0e5 |
+-----------------------+--------------------------------------+

(overcloud) [stack@undercloud-0 ~]$ cinder  --os-volume-api-version 3.44  attachment-list
+--------------------------------------+--------------------------------------+----------+--------------------------------------+
| ID                                   | Volume ID                            | Status   | Server ID                            |
+--------------------------------------+--------------------------------------+----------+--------------------------------------+
| 0da38e30-688d-4f28-86fe-1c43b19ce8ee | a6606b7c-660b-4446-b649-113de9cac0c1 | attached | 04d06e6d-e6d4-46fe-bc78-aac780abcde5 |
| b11a0bc5-1ec5-4294-a6d3-2c1e2d54fa67 | e033f7c9-a132-4f17-bee3-6b43d450f0e5 | attached | 647fbcfb-c034-488c-b74a-d6f59655207d |
+--------------------------------------+--------------------------------------+----------+--------------------------------------+

First/inst1:
(overcloud) [stack@undercloud-0 ~]$ cinder  --os-volume-api-version 3.44  attachment-show 0da38e30-688d-4f28-86fe-1c43b19ce8ee | grep format 
| format             | raw                                         |

Second/inst2
(overcloud) [stack@undercloud-0 ~]$ cinder  --os-volume-api-version 3.44  attachment-show b11a0bc5-1ec5-4294-a6d3-2c1e2d54fa67 | grep format 
| format             | raw                                         |

As can be seen above on both cases, as expected connection info returns raw as the volume's format. 

Now lets set on Cinder.conf under the backend section:
nfs_qcow2_volumes = true, plus restart c-vol\c-api.

Then lets recreate / attach new volumes and recheck connection info again.

(overcloud) [stack@undercloud-0 ~]$ cinder create 2 --name EmptyVolB
+--------------------------------+--------------------------------------+
| Property                       | Value                                |
+--------------------------------+--------------------------------------+
| attachments                    | []                                   |
| availability_zone              | nova                                 |
| bootable                       | false                                |
| consistencygroup_id            | None                                 |
| created_at                     | 2022-03-07T13:35:57.000000           |
| description                    | None                                 |
| encrypted                      | False                                |
| id                             | 1a203a32-86f9-4f71-a532-f4df3fe9bc18 |
| metadata                       | {}                                   |
| migration_status               | None                                 |
| multiattach                    | False                                |
| name                           | EmptyVolB                            |
| os-vol-host-attr:host          | hostgroup@tripleo_nfs#tripleo_nfs    |
| os-vol-mig-status-attr:migstat | None                                 |
| os-vol-mig-status-attr:name_id | None                                 |
| os-vol-tenant-attr:tenant_id   | 1d0c7f0ebdbb454785e5506fa6e92295     |
| replication_status             | None                                 |
| size                           | 2                                    |
| snapshot_id                    | None                                 |
| source_volid                   | None                                 |
| status                         | creating                             |
| updated_at                     | 2022-03-07T13:35:57.000000           |
| user_id                        | 0f74a44ac5e24ea08b27bddaedad7754     |
| volume_type                    | tripleo                              |
+--------------------------------+--------------------------------------+

(overcloud) [stack@undercloud-0 ~]$ cinder create 2 --image a68042cd-3fa4-41a7-896a-20671435cb75 --name VolFromImageB
+--------------------------------+--------------------------------------+
| Property                       | Value                                |
+--------------------------------+--------------------------------------+
| attachments                    | []                                   |
| availability_zone              | nova                                 |
| bootable                       | false                                |
| consistencygroup_id            | None                                 |
| created_at                     | 2022-03-07T13:37:11.000000           |
| description                    | None                                 |
| encrypted                      | False                                |
| id                             | 319f7992-41c6-4a66-89bc-2a4be4e97eaf |
| metadata                       | {}                                   |
| migration_status               | None                                 |
| multiattach                    | False                                |
| name                           | VolFromImageB                        |
| os-vol-host-attr:host          | None                                 |
| os-vol-mig-status-attr:migstat | None                                 |
| os-vol-mig-status-attr:name_id | None                                 |
| os-vol-tenant-attr:tenant_id   | 1d0c7f0ebdbb454785e5506fa6e92295     |
| replication_status             | None                                 |
| size                           | 2                                    |
| snapshot_id                    | None                                 |
| source_volid                   | None                                 |
| status                         | creating                             |
| updated_at                     | None                                 |
| user_id                        | 0f74a44ac5e24ea08b27bddaedad7754     |
| volume_type                    | tripleo                              |
+--------------------------------+--------------------------------------+

(overcloud) [stack@undercloud-0 ~]$ cinder list
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
| ID                                   | Status    | Name          | Size | Volume Type | Bootable | Attached to                          |
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
| 1a203a32-86f9-4f71-a532-f4df3fe9bc18 | available | EmptyVolB     | 2    | tripleo     | false    |                                      |
| 319f7992-41c6-4a66-89bc-2a4be4e97eaf | available | VolFromImageB | 2    | tripleo     | true     |                                      |
| a6606b7c-660b-4446-b649-113de9cac0c1 | in-use    | EmptyVol      | 2    | tripleo     | false    | 04d06e6d-e6d4-46fe-bc78-aac780abcde5 |
| e033f7c9-a132-4f17-bee3-6b43d450f0e5 | in-use    | VolFromImage  | 2    | tripleo     | true     | 647fbcfb-c034-488c-b74a-d6f59655207d |
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+

Lets detach original volumes and re-attach the new ones istead. 
(overcloud) [stack@undercloud-0 ~]$ nova volume-detach inst1 a6606b7c-660b-4446-b649-113de9cac0c1
(overcloud) [stack@undercloud-0 ~]$ nova volume-detach inst2 e033f7c9-a132-4f17-bee3-6b43d450f0e5

(overcloud) [stack@undercloud-0 ~]$ nova volume-attach inst1 1a203a32-86f9-4f71-a532-f4df3fe9bc18
+-----------------------+--------------------------------------+
| Property              | Value                                |
+-----------------------+--------------------------------------+
| delete_on_termination | False                                |
| device                | /dev/vdb                             |
| id                    | 1a203a32-86f9-4f71-a532-f4df3fe9bc18 |
| serverId              | 04d06e6d-e6d4-46fe-bc78-aac780abcde5 |
| tag                   | -                                    |
| volumeId              | 1a203a32-86f9-4f71-a532-f4df3fe9bc18 |
+-----------------------+--------------------------------------+
(overcloud) [stack@undercloud-0 ~]$ nova volume-attach inst2 319f7992-41c6-4a66-89bc-2a4be4e97eaf
+-----------------------+--------------------------------------+
| Property              | Value                                |
+-----------------------+--------------------------------------+
| delete_on_termination | False                                |
| device                | /dev/vdb                             |
| id                    | 319f7992-41c6-4a66-89bc-2a4be4e97eaf |
| serverId              | 647fbcfb-c034-488c-b74a-d6f59655207d |
| tag                   | -                                    |
| volumeId              | 319f7992-41c6-4a66-89bc-2a4be4e97eaf |
+-----------------------+--------------------------------------+
(overcloud) [stack@undercloud-0 ~]$ cinder list
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
| ID                                   | Status    | Name          | Size | Volume Type | Bootable | Attached to                          |
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+
| 1a203a32-86f9-4f71-a532-f4df3fe9bc18 | in-use    | EmptyVolB     | 2    | tripleo     | false    | 04d06e6d-e6d4-46fe-bc78-aac780abcde5 |
| 319f7992-41c6-4a66-89bc-2a4be4e97eaf | in-use    | VolFromImageB | 2    | tripleo     | true     | 647fbcfb-c034-488c-b74a-d6f59655207d |
| a6606b7c-660b-4446-b649-113de9cac0c1 | available | EmptyVol      | 2    | tripleo     | false    |                                      |
| e033f7c9-a132-4f17-bee3-6b43d450f0e5 | available | VolFromImage  | 2    | tripleo     | true     |                                      |
+--------------------------------------+-----------+---------------+------+-------------+----------+--------------------------------------+

(overcloud) [stack@undercloud-0 ~]$ cinder  --os-volume-api-version 3.44  attachment-list
+--------------------------------------+--------------------------------------+----------+--------------------------------------+
| ID                                   | Volume ID                            | Status   | Server ID                            |
+--------------------------------------+--------------------------------------+----------+--------------------------------------+
| 5aa4fabc-19fc-4731-bc16-1a34aa898afc | 1a203a32-86f9-4f71-a532-f4df3fe9bc18 | attached | 04d06e6d-e6d4-46fe-bc78-aac780abcde5 |
| afaeb94c-10ae-4c59-b9f3-77759cc899ac | 319f7992-41c6-4a66-89bc-2a4be4e97eaf | attached | 647fbcfb-c034-488c-b74a-d6f59655207d |
+--------------------------------------+--------------------------------------+----------+--------------------------------------+


Lets check each volumes format:

(overcloud) [stack@undercloud-0 ~]$ cinder  --os-volume-api-version 3.44  attachment-show 5aa4fabc-19fc-4731-bc16-1a34aa898afc | grep format 
| format             | qcow2                                       |

(overcloud) [stack@undercloud-0 ~]$ cinder  --os-volume-api-version 3.44  attachment-show afaeb94c-10ae-4c59-b9f3-77759cc899ac | grep format 
| format             | qcow2                                       |


We proved that correct format info for filesystem type drivers
happens during attachment of either empty volumes as well as volumes from an image.

And that the above is true for both cases:
the default nfs_qcow2_volumes=false,
as well as nfs_qcow2_volumes=true.
Good to verify.

Comment 18 errata-xmlrpc 2022-03-24 11:01:35 UTC
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 (Red Hat OpenStack Platform 16.1.8 bug fix and enhancement advisory), 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:0986


Note You need to log in before you can comment on or make changes to this bug.