Comment 0 for bug 2031653

Revision history for this message
Rajat Dhasmana (whoami-rajat) wrote : Cinder allows updating default volume type

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

stack@rajat-devstack:~$ cinder create 1
+--------------------------------+----------------------------------------+
| Property | Value |
+--------------------------------+----------------------------------------+
| id | aec0003a-bc12-4e15-acc8-d0a637cababd |
...
| volume_type | default-type |
| volume_type_id | 7c4c9894-fb4b-4c63-9604-c8c6bb919149 |
+--------------------------------+----------------------------------------+
stack@rajat-devstack:~$ 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'

stack@rajat-devstack:~$ 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

stack@rajat-devstack:~$ 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)