Bug 1947415 - [RHOSP16.1]: Unable to delete __DEFAULT__ volume type
Summary: [RHOSP16.1]: Unable to delete __DEFAULT__ volume type
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z7
: 16.1 (Train on RHEL 8.2)
Assignee: Rajat Dhasmana
QA Contact: Tzach Shefi
RHOS Documentation Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-08 12:41 UTC by Shravan Kumar Tiwari
Modified: 2021-12-09 20:19 UTC (History)
4 users (show)

Fixed In Version: openstack-cinder-15.4.0-1.20210709072758.58f0e73.el8ost
Doc Type: Bug Fix
Doc Text:
Before this update, a failure occurred when users wanted to delete the `__DEFAULT__` volume type. + With this update, you can delete the `__DEFAULT__` volume type when it is not set as the value of the `default_volume_type` parameter in the `cinder.conf` file. The default value of the `default_volume_type` parameter is `__DEFAULT__` so you must set it to an appropriate volume type, for example 'tripleo', so that you can delete the `__DEFAULT__` volume type.
Clone Of:
Environment:
Last Closed: 2021-12-09 20:18:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 752916 0 None MERGED Modify default/delete volume type logic 2021-04-08 20:48:47 UTC
Red Hat Issue Tracker OSP-2031 0 None None None 2021-11-18 11:35:50 UTC
Red Hat Product Errata RHBA-2021:3762 0 None None None 2021-12-09 20:19:00 UTC

Description Shravan Kumar Tiwari 2021-04-08 12:41:34 UTC
Description of problem:
In order to prevent confusion, customer want to get rid of volume types that are not to be used. So they want to delete the __DEFAULT__ volume type.

They have the default_volume_type defined as 'nvme' (in this case).


Version-Release number of selected component (if applicable):
RHOSP16.1 Z3

Additional Information:

There is an upstream bug: https://bugs.launchpad.net/cinder/+bug/1886632 that is supposed to be fixed in Train release.


Following are the details from current env.

-- $ openstack volume type list --long
+--------------------------------------+-------------+-----------+---------------------+------------+
| ID                                   | Name        | Is Public | Description         | Properties |
+--------------------------------------+-------------+-----------+---------------------+------------+
| 929a6d82-ec95-4438-9896-200684fd6afa | nvme        | True      | None                |            |
| 91835972-c228-4fd9-8d08-861e7f619ad5 | __DEFAULT__ | True      | Default Volume Type |            |
+--------------------------------------+-------------+-----------+---------------------+------------+

-- $ openstack volume type list --default
+--------------------------------------+------+-----------+
| ID                                   | Name | Is Public |
+--------------------------------------+------+-----------+
| 929a6d82-ec95-4438-9896-200684fd6afa | nvme | True      |
+--------------------------------------+------+-----------+

-- openstack volume type delete __DEFAULT__

It fails with error "Failed to delete volume type with name or ID '__DEFAULT__': Target volume type is default and cannot be deleted. (HTTP 400"

Comment 13 Tzach Shefi 2021-08-01 12:40:39 UTC
Verified on:
openstack-cinder-15.4.0-1.20210713144324.58f0e73.el8ost.noarch

Types that we currently have:

(overcloud) [stack@undercloud-0 ~]$ openstack volume type list --long
+--------------------------------------+-------------+-----------+---------------------+------------+
| ID                                   | Name        | Is Public | Description         | Properties |
+--------------------------------------+-------------+-----------+---------------------+------------+
| d9c999f3-58d9-44ff-9a61-390bd5439af1 | tripleo     | True      | None                |            |
| daa51200-aaf5-4031-abb4-646bbf9493b3 | __DEFAULT__ | True      | Default Volume Type |            |
+--------------------------------------+-------------+-----------+---------------------+------------+

The default type is set to tripleo
(overcloud) [stack@undercloud-0 ~]$ openstack volume type list --default
+--------------------------------------+---------+-----------+
| ID                                   | Name    | Is Public |
+--------------------------------------+---------+-----------+
| d9c999f3-58d9-44ff-9a61-390bd5439af1 | tripleo | True      |
+--------------------------------------+---------+-----------+


Lets try to delete "__DEFAULT__"
(overcloud) [stack@undercloud-0 ~]$ openstack volume type delete __DEFAULT__

Looks good, this time we're able to delete __DEFAULT__ and are left with only the tripleo volume type:
(overcloud) [stack@undercloud-0 ~]$ openstack volume type list --long
+--------------------------------------+---------+-----------+-------------+------------+
| ID                                   | Name    | Is Public | Description | Properties |
+--------------------------------------+---------+-----------+-------------+------------+
| d9c999f3-58d9-44ff-9a61-390bd5439af1 | tripleo | True      | None        |            |
+--------------------------------------+---------+-----------+-------------+------------+

Good to verify.

Comment 29 errata-xmlrpc 2021-12-09 20:18:39 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.7 (Train) 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-2021:3762


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