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
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)
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 ------- ------- ------- ------- ----+-- ------- -----+- ------- -----+- ------- ---+ ------- ------- ------- ------- ----+-- ------- -----+- ------- -----+- ------- ---+ fb4b-4c63- 9604-c8c6bb9191 49 | default-type | - | True | ------- ------- ------- ------- ----+-- ------- -----+- ------- -----+- ------- ---+
+------
| ID | Name | Description | Is_Public |
+------
| 7c4c9894-
+------
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 ------- ------- ------- -----+- ------- ------- ------- ------- ------- ----+ ------- ------- ------- -----+- ------- ------- ------- ------- ------- ----+ bc12-4e15- acc8-d0a637caba bd | fb4b-4c63- 9604-c8c6bb9191 49 | ------- ------- ------- -----+- ------- ------- ------- ------- ------- ----+ devstack: ~$ cinder list ------- ------- ------- ------- ----+-- ------- --+---- --+---- --+---- ------- -----+- ------- ------+ ------- ---+--- ------- ------- ------- ------- ------- + ------- ------- ------- ------- ----+-- ------- --+---- --+---- --+---- ------- -----+- ------- ------+ ------- ---+--- ------- ------- ------- ------- ------- + bc12-4e15- acc8-d0a637caba bd | available | - | 1 | True | default-type | false | | ------- ------- ------- ------- ----+-- ------- --+---- --+---- --+---- ------- -----+- ------- ------+ ------- ---+--- ------- ------- ------- ------- ------- +
+------
| Property | Value |
+------
| id | aec0003a-
...
| volume_type | default-type |
| volume_type_id | 7c4c9894-
+------
stack@rajat-
+------
| ID | Status | Name | Size | Consumes Quota | Volume Type | Bootable | Attached to |
+------
| aec0003a-
+------
3. Update the type 'default-type' to 'new-type'
stack@rajat- devstack: ~$ cinder type-update 7c4c9894- fb4b-4c63- 9604-c8c6bb9191 49 --name new-type ------- ------- ------- ------- ----+-- ------- -+----- ------- -+----- ------+ ------- ------- ------- ------- ----+-- ------- -+----- ------- -+----- ------+ fb4b-4c63- 9604-c8c6bb9191 49 | new-type | - | True | ------- ------- ------- ------- ----+-- ------- -+----- ------- -+----- ------+
+------
| ID | Name | Description | Is_Public |
+------
| 7c4c9894-
+------
4. Try creating a volume again
stack@rajat- devstack: ~$ cinder create 1 ead9-4225- a561-6404f079f2 41)
ERROR: The request cannot be fulfilled as the default volume type default-type cannot be found. (HTTP 500) (Request-ID: req-1fafebe9-