changing name of default volume type can break some volume-create requests

Bug #2031653 reported by Rajat Dhasmana
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
In Progress
Undecided
Rajat Dhasmana

Bug Description

Cinder currently allows us to update the type set as default volume type (either in cinder.conf or project specific default).
The problem is that, after the type update, subsequent request that require the default volume type will fail.

Steps to reproduce:

1. Create a type and set it as default in cinder.conf

$ cinder type-create default-type
+--------------------------------------+--------------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+--------------+-------------+-----------+
| 7c4c9894-fb4b-4c63-9604-c8c6bb919149 | default-type | - | True |
+--------------------------------------+--------------+-------------+-----------+

default_volume_type = default-type

2. Try creating volume without specifying type and see if it gets created with default type

$ cinder create 1
+--------------------------------+----------------------------------------+
| Property | Value |
+--------------------------------+----------------------------------------+
| id | aec0003a-bc12-4e15-acc8-d0a637cababd |
...
| volume_type | default-type |
| volume_type_id | 7c4c9894-fb4b-4c63-9604-c8c6bb919149 |
+--------------------------------+----------------------------------------+

$ cinder list
+--------------------------------------+-----------+------+------+----------------+--------------+----------+--------------------------------------+
| ID | Status | Name | Size | Consumes Quota | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------+------+----------------+--------------+----------+--------------------------------------+
| aec0003a-bc12-4e15-acc8-d0a637cababd | available | - | 1 | True | default-type | false | |
+--------------------------------------+-----------+------+------+----------------+--------------+----------+--------------------------------------+

3. Update the type 'default-type' to 'new-type'

$ cinder type-update 7c4c9894-fb4b-4c63-9604-c8c6bb919149 --name new-type
+--------------------------------------+----------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+----------+-------------+-----------+
| 7c4c9894-fb4b-4c63-9604-c8c6bb919149 | new-type | - | True |
+--------------------------------------+----------+-------------+-----------+

4. Try creating a volume again

$ cinder create 1
ERROR: The request cannot be fulfilled as the default volume type default-type cannot be found. (HTTP 500) (Request-ID: req-1fafebe9-ead9-4225-a561-6404f079f241)

Changed in cinder:
assignee: nobody → Rajat Dhasmana (whoami-rajat)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/891696

Changed in cinder:
status: New → In Progress
summary: - Cinder allows updating default volume type
+ changing name of default volume type can break some volume-create
+ requests
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.