Bug 2037035 - cinderclient needs server_id parameter to create an attachment
Summary: cinderclient needs server_id parameter to create an attachment
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-cinderclient
Version: 16.2 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z2
: 16.2 (Train on RHEL 8.4)
Assignee: Rajat Dhasmana
QA Contact: Tzach Shefi
Andy Stillman
URL:
Whiteboard:
: 2036950 (view as bug list)
Depends On: 2037034
Blocks: 2004316 2037039
TreeView+ depends on / blocked
 
Reported: 2022-01-04 17:09 UTC by Rajat Dhasmana
Modified: 2022-03-23 22:13 UTC (History)
5 users (show)

Fixed In Version: python-cinderclient-5.0.2-2.20220107174846.7e9e31c.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-23 22:12:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 802782 0 None MERGED Make instance_uuid optional in attachment create 2022-01-05 13:28:14 UTC
Red Hat Issue Tracker OSP-12009 0 None None None 2022-01-04 17:16:47 UTC
Red Hat Product Errata RHBA-2022:1001 0 None None None 2022-03-23 22:13:29 UTC

Description Rajat Dhasmana 2022-01-04 17:09:34 UTC
When requesting cinderclient to create a new attachment, it requires server_id as a required parameter which is not available when we're creating attachment from glance cinder store.

Comment 4 Rajat Dhasmana 2022-01-18 09:13:44 UTC
*** Bug 2036950 has been marked as a duplicate of this bug. ***

Comment 8 Tzach Shefi 2022-03-01 04:57:03 UTC
Verified on:
python3-cinderclient-5.0.2-2.20220107174846.7e9e31c.el8ost.noarch


Verified on:
openstack-cinder-15.6.1-2.20220112174913.c093eda.el8ost.noarch

On a recent bz2049130, we proved image uploading to Glance over Cinder works.
I'll re-paste a part of that same verification here as it proves this bug is verified too.
Where this bug not fixed, Glance image upload over Cinder would have failed. 


On a deployment with Glance over Cinder, over netapp iSCSI with multipath enabled:

We successfully uploaded a cirros qcow2 image:

(overcloud) [stack@undercloud-0 ~]$ glance image-show e8cf1375-c6cc-4e59-bfea-a84b2a4bec55
+----------------------------------+----------------------------------------------------------------------------------+
| Property                         | Value                                                                            |
+----------------------------------+----------------------------------------------------------------------------------+
| checksum                         | 443b7623e27ecf03dc9e01ee93f67afe                                                 |
| container_format                 | bare                                                                             |
| created_at                       | 2022-02-13T12:47:48Z                                                             |
| direct_url                       | cinder://abcbdf43-73f3-42b5-8545-f32f90fdcddb                                    |  --> Cinder backed. 
| disk_format                      | qcow2                                                                            |
| id                               | e8cf1375-c6cc-4e59-bfea-a84b2a4bec55                                             |
| min_disk                         | 0                                                                                |
| min_ram                          | 0                                                                                |
| name                             | cirros                                                                           |
| os_hash_algo                     | sha512                                                                           |
| os_hash_value                    | 6513f21e44aa3da349f248188a44bc304a3653a04122d8fb4535423c8e1d14cd6a153f735bb0982e |
|                                  | 2161b5b5186106570c17a9e58b64dd39390617cd5a350f78                                 |
| os_hidden                        | False                                                                            |
| owner                            | 055c71e6d74b444a8a637a12826e4491                                                 |
| owner_specified.openstack.md5    |                                                                                  |
| owner_specified.openstack.object | images/cirros                                                                    |
| owner_specified.openstack.sha256 |                                                                                  |
| protected                        | False                                                                            |
| size                             | 12716032                                                                         |
| status                           | active                                                                           |---> Active 
| stores                           | default_backend                                                                  |
| tags                             | []                                                                               |
| updated_at                       | 2022-02-13T12:48:06Z                                                             |
| virtual_size                     | Not available                                                                    |
| visibility                       | public                                                                           |
+----------------------------------+----------------------------------------------------------------------------------+

(overcloud) [stack@undercloud-0 ~]$ cinder service-list
+------------------+--------------------------+------+---------+-------+----------------------------+-----------------+
| Binary           | Host                     | Zone | Status  | State | Updated_at                 | Disabled Reason |
+------------------+--------------------------+------+---------+-------+----------------------------+-----------------+
| cinder-backup    | controller-1             | nova | enabled | up    | 2022-02-13T12:50:08.000000 | -               |
| cinder-scheduler | controller-0             | nova | enabled | up    | 2022-02-13T12:50:04.000000 | -               |
| cinder-scheduler | controller-1             | nova | enabled | up    | 2022-02-13T12:50:06.000000 | -               |
| cinder-scheduler | controller-2             | nova | enabled | up    | 2022-02-13T12:50:06.000000 | -               |
| cinder-volume    | hostgroup@tripleo_netapp | nova | enabled | up    | 2022-02-13T12:50:00.000000 | -               |  --> The netapp iSCSI backend. 
+------------------+--------------------------+------+---------+-------+----------------------------+-----------------+



Now this time lets try with a raw image:
(overcloud) [stack@undercloud-0 ~]$ glance image-create --name rhel7.9.raw --disk-format raw --container-format bare --file rhel-server-7.9-update-9-x86_64-kvm.raw
+------------------+----------------------------------------------------------------------------------+
| Property         | Value                                                                            |
+------------------+----------------------------------------------------------------------------------+
| checksum         | 1e45e025443492de8d6e4b38ec265abe                                                 |
| container_format | bare                                                                             |
| created_at       | 2022-02-13T13:01:49Z                                                             |
| direct_url       | cinder://c8f12ad0-16b6-415c-a82b-f52628429946                                    |
| disk_format      | raw                                                                              |
| id               | 2628daec-9274-42e3-8a87-1f0aed015948                                             |
| min_disk         | 0                                                                                |
| min_ram          | 0                                                                                |
| name             | rhel7.9.raw                                                                      |
| os_hash_algo     | sha512                                                                           |
| os_hash_value    | 9266d25c2b74881526a5807fd594d4a145db99cde1e52fdbbefcade841daaefffa18cef0eb131760 |
|                  | 06369a91e5c6e7d72f1df2ae68d24d889e057236b9d59e77                                 |
| os_hidden        | False                                                                            |
| owner            | 055c71e6d74b444a8a637a12826e4491                                                 |
| protected        | False                                                                            |
| size             | 10737418240                                                                      |
| status           | active                                                                           |--> Also active. 
| stores           | default_backend                                                                  |
| tags             | []                                                                               |
| updated_at       | 2022-02-13T13:04:45Z                                                             |
| virtual_size     | Not available                                                                    |
| visibility       | shared                                                                           |
+------------------+----------------------------------------------------------------------------------+

Good to verify, having shown that we successfully managed to upload/create 2 images to Glance which is backed by Cinder. 
This also proves cinderclient needs server_id parameter to create an attachment is working as expected.

Comment 9 Brian Rosmaita 2022-03-01 20:41:34 UTC
Just want to clarify Tzach's final sentence in comment #8.
When he says "This also proves cinderclient needs server_id parameter to create an attachment is working as expected", what he means is "This also proves <name-of-this-BZ> is working as expected".
The backported fix that's the subject of this BZ makes it the case that the server_id parameter is no longer required when using cinderclient to create an attachment.
(Apologies for being pedantic, but I can imagine someone reading through this BZ in a year or so and being really confused.)

Comment 10 Tzach Shefi 2022-03-02 10:03:40 UTC
Thanks for the needed clarification Brain, spot on.

Comment 15 errata-xmlrpc 2022-03-23 22:12:53 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 (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


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