Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2006888

Summary: RBD: use correct stripe unit in clone operation
Product: Red Hat OpenStack Reporter: Giulio Fidente <gfidente>
Component: openstack-cinderAssignee: Jon Bernard <jobernar>
Status: CLOSED ERRATA QA Contact: Tzach Shefi <tshefi>
Severity: high Docs Contact:
Priority: high    
Version: 16.1 (Train)CC: abishop, eharney, gcharot, jobernar, ltoscano, tshefi
Target Milestone: z8Keywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-cinder-15.4.0-1.20220110163412.58f0e73.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2002772 Environment:
Last Closed: 2022-03-24 11:01:35 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: 2002772    
Bug Blocks: 1992622    

Description Giulio Fidente 2021-09-22 15:34:52 UTC
+++ This bug was initially created as a clone of Bug #2002772 +++

Quoting from the existing fix submitted to master and stable/wallaby:

The recent release of Ceph Pacific saw a change to the clone() logic
where invalid values of stripe unit would cause an error to be returned
where previous versions would correct the value at runtime.  This
becomes a problem when creating a volume from an image, where the source
RBD image may have a larger stripe unit than cinder's RBD driver is
configured for.  When this happens, clone() is called with a stripe unit
that is too small given that of the source image and the clone fails

Comment 6 Tzach Shefi 2022-02-02 18:11:56 UTC
Verified on:
openstack-cinder-15.4.0-1.20220114193342.58f0e73.el8ost.noarch

Installed with external ceph RHCS5.

Uploaded a cirros image to glance:
(overcloud) [stack@undercloud-0 ~]$ glance image-show 8e438b7d-a55d-48f6-b699-e92b168c31b3
+----------------------------------+----------------------------------------------------------------------------------+
| Property                         | Value                                                                            |
+----------------------------------+----------------------------------------------------------------------------------+
| checksum                         | ba3cd24377dde5dfdd58728894004abb                                                 |
| container_format                 | bare                                                                             |
| created_at                       | 2022-02-02T18:03:29Z                                                             |
| direct_url                       | rbd://cdf24729-bd06-46c2-ba47-7018ae220197/automation-                           |
|                                  | images/8e438b7d-a55d-48f6-b699-e92b168c31b3/snap                                 |
| disk_format                      | raw                                                                              |
| id                               | 8e438b7d-a55d-48f6-b699-e92b168c31b3                                             |
| locations                        | [{"url": "rbd://cdf24729-bd06-46c2-ba47-7018ae220197/automation-                 |
|                                  | images/8e438b7d-a55d-48f6-b699-e92b168c31b3/snap", "metadata": {"store":         |
|                                  | "default_backend"}}]                                                             |
| min_disk                         | 0                                                                                |
| min_ram                          | 0                                                                                |
| name                             | cirros                                                                           |
| os_hash_algo                     | sha512                                                                           |
| os_hash_value                    | b795f047a1b10ba0b7c95b43b2a481a59289dc4cf2e49845e60b194a911819d3ada03767bbba4143 |
|                                  | b44c93fd7f66c96c5a621e28dff51d1196dae64974ce240e                                 |
| os_hidden                        | False                                                                            |
| owner                            | b6a74b15f165443eb54f50dd01108989                                                 |
| owner_specified.openstack.md5    |                                                                                  |
| owner_specified.openstack.object | images/cirros                                                                    |
| owner_specified.openstack.sha256 |                                                                                  |
| protected                        | False                                                                            |
| size                             | 46137344                                                                         |
| status                           | active                                                                           |
| stores                           | default_backend                                                                  |
| tags                             | []                                                                               |
| updated_at                       | 2022-02-02T18:03:34Z                                                             |
| virtual_size                     | Not available                                                                    |
| visibility                       | public                                                                           |
+----------------------------------+----------------------------------------------------------------------------------+


Successfully booted a new instance from image (create bootable volume):
(overcloud) [stack@undercloud-0 ~]$  nova boot --flavor tiny  --block-device source=image,id=8e438b7d-a55d-48f6-b699-e92b168c31b3,dest=volume,size=1,shutdown=preserve,bootindex=0 myInstanceFromVolume --nic net-id=2e62a540-c021-4b91-bcff-40d5ddeca869

+--------------------------------------+-------------------------------------------------+
| Property                             | Value                                           |
+--------------------------------------+-------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                          |
| OS-EXT-AZ:availability_zone          |                                                 |
| OS-EXT-SRV-ATTR:host                 | -                                               |
| OS-EXT-SRV-ATTR:hostname             | myinstancefromvolume                            |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | -                                               |
| OS-EXT-SRV-ATTR:instance_name        |                                                 |
| OS-EXT-SRV-ATTR:kernel_id            |                                                 |
| OS-EXT-SRV-ATTR:launch_index         | 0                                               |
| OS-EXT-SRV-ATTR:ramdisk_id           |                                                 |
| OS-EXT-SRV-ATTR:reservation_id       | r-if88q70d                                      |
| OS-EXT-SRV-ATTR:root_device_name     | -                                               |
| OS-EXT-SRV-ATTR:user_data            | -                                               |
| OS-EXT-STS:power_state               | 0                                               |
| OS-EXT-STS:task_state                | scheduling                                      |
| OS-EXT-STS:vm_state                  | building                                        |
| OS-SRV-USG:launched_at               | -                                               |
| OS-SRV-USG:terminated_at             | -                                               |
| accessIPv4                           |                                                 |
| accessIPv6                           |                                                 |
| adminPass                            | mjHeChAJV9kq                                    |
| config_drive                         |                                                 |
| created                              | 2022-02-02T18:06:30Z                            |
| description                          | -                                               |
| flavor:disk                          | 1                                               |
| flavor:ephemeral                     | 0                                               |
| flavor:extra_specs                   | {}                                              |
| flavor:original_name                 | tiny                                            |
| flavor:ram                           | 512                                             |
| flavor:swap                          | 0                                               |
| flavor:vcpus                         | 1                                               |
| hostId                               |                                                 |
| host_status                          |                                                 |
| id                                   | c3be62dc-8bec-4bd2-8677-2161d3c81637            |
| image                                | Attempt to boot from volume - no image supplied |
| key_name                             | -                                               |
| locked                               | False                                           |
| locked_reason                        | -                                               |
| metadata                             | {}                                              |
| name                                 | myInstanceFromVolume                            |
| os-extended-volumes:volumes_attached | []                                              |
| progress                             | 0                                               |
| security_groups                      | default                                         |
| server_groups                        | []                                              |
| status                               | BUILD                                           |
| tags                                 | []                                              |
| tenant_id                            | b6a74b15f165443eb54f50dd01108989                |
| trusted_image_certificates           | -                                               |
| updated                              | 2022-02-02T18:06:30Z                            |
| user_id                              | d62436297fdd46398e093412d91f647b                |
+--------------------------------------+-------------------------------------------------+

We can see the new boot volume created
(overcloud) [stack@undercloud-0 ~]$ cinder list
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+
| ID                                   | Status | Name         | Size | Volume Type | Bootable | Attached to                          |
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+
| d711ecc4-0f78-4e15-a644-f450724afcd4 | in-use |              | 1    | tripleo     | true     | c3be62dc-8bec-4bd2-8677-2161d3c81637 |
+--------------------------------------+--------+--------------+------+-------------+----------+--------------------------------------+


Yay successfully booted from boot volume:
(overcloud) [stack@undercloud-0 ~]$ nova list
+--------------------------------------+----------------------+--------+------------+-------------+-----------------------------------+
| ID                                   | Name                 | Status | Task State | Power State | Networks                          |
+--------------------------------------+----------------------+--------+------------+-------------+-----------------------------------+
| c3be62dc-8bec-4bd2-8677-2161d3c81637 | myInstanceFromVolume | ACTIVE | -          | Running     | internal=192.168.0.14             |
+--------------------------------------+----------------------+--------+------------+-------------+-----------------------------------+


We can access the running instance
login as 'cirros' user. default password: 'gocubsgo'. use 'sudo' for root.
myinstancefromvolume login: cirros
Password: 
$ #we're in the instance


Had the issue not been fixed this instance wouldn't have booted up.
Good to verify!

Comment 12 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