Volume Type deletion error (image_volume_cache_enabled = True) - stable/xena
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
New
|
Medium
|
Tushar Trambak Gite |
Bug Description
VolumeType cannot be deleted when "image_
In the case of "image_
The volume cache is created by the VolumeType used in the original volume, so I cannot delete the VolumeType until the volume cache is deleted.
I can remove the Volume Type by manually deleting the volume cache before deleting the Volume Type.
But it doesn't seem to make sense for cache, and it's difficult to implement when using Stack.
Is there a way to control Volume and Volume Type by Stack in the case of “image_
The procedure for causing the error is as follows.
1. create Stack
1-1. create VolumeType
1-2. create Volume
2. delete Stack
2-1. delete Volume
2-2. delete VolumeType <-- ERROR
* Error message
```
Resource DELETE failed: BadRequest: resources.multi: Target volume type is still in use. (HTTP 400) (Request-ID: req-ee7a653a-
```
* Operation log
0. initial state
```
$ openstack volume list
$ openstack volume type list
+------
| ID | Name | Is Public |
+------
| afcc773f-
| 0ac7b1cc-
+------
mysql> select * from volumes;
Empty set (0.00 sec)
mysql> select * from volume_types;
+------
| created_at | updated_at | deleted_at | deleted | id | name | qos_specs_id | is_public | description |
+------
| 2021-11-09 02:01:54 | 2021-11-09 02:01:54 | NULL | 0 | 0ac7b1cc-
| 2021-11-09 02:07:28 | NULL | NULL | 0 | afcc773f-
+------
2 rows in set (0.00 sec)
```
1. create Stack
```
$ openstack stack create --template stack-for-
+------
| Field | Value |
+------
| id | 4908b2ab-
| stack_name | test-stack |
| description | Cinder test |
| creation_time | 2021-12-
| updated_time | None |
| stack_status | CREATE_IN_PROGRESS |
| stack_status_reason | Stack CREATE started |
+------
$ openstack stack list
+------
| ID | Stack Name | Project | Stack Status | Creation Time | Updated Time |
+------
| 4908b2ab-
+------
$ openstack volume list
+------
| ID | Name | Status | Size | Attached to |
+------
| 6b4b1bc1-
+------
$ openstack volume type list
+------
| ID | Name | Is Public |
+------
| bd5c3bc5-
| afcc773f-
| 0ac7b1cc-
+------
mysql> select display_
+------
| display_name | deleted | id | user_id | project_id | status | volume_type_id |
+------
| image-64090ba9-
| test-volume | 0 | 6b4b1bc1-
+------
2 rows in set (0.00 sec)
mysql> select * from volume_types;
+------
| created_at | updated_at | deleted_at | deleted | id | name | qos_specs_id | is_public | description |
+------
| 2021-11-09 02:01:54 | 2021-11-09 02:01:54 | NULL | 0 | 0ac7b1cc-
| 2021-11-09 02:07:28 | NULL | NULL | 0 | afcc773f-
| 2021-12-08 07:22:15 | NULL | NULL | 0 | bd5c3bc5-
+------
3 rows in set (0.00 sec)
```
2. delete Stack
```
$ openstack stack delete 4908b2ab-
Are you sure you want to delete this stack(s) [y/N]? y
$ openstack stack list
+------
| ID | Stack Name | Project | Stack Status | Creation Time | Updated Time |
+------
| 4908b2ab-
+------
$ openstack stack show 4908b2ab-
+------
| Field | Value |
+------
| id | 4908b2ab-
| stack_name | test-stack |
| description | Cinder test |
| creation_time | 2021-12-
| updated_time | 2021-12-
| stack_status | DELETE_FAILED |
| stack_status_reason | Resource DELETE failed: BadRequest: resources.multi: Target volume type is still in use. (HTTP 400) (Request-ID: req-ee7a653a-
| parameters | OS::project_id: 16ca0ec90a274db
| | OS::stack_id: 4908b2ab-
| | OS::stack_name: test-stack |
| | |
| outputs | [] |
| | |
| links | - href: http://
| | rel: self |
| | |
| deletion_time | None |
| notification_topics | [] |
| capabilities | [] |
| disable_rollback | True |
| timeout_mins | None |
| stack_owner | nfv_user |
| parent | None |
| stack_user_
| tags | [] |
| | |
+------
$ openstack volume list
$ openstack volume type list
+------
| ID | Name | Is Public |
+------
| bd5c3bc5-
| afcc773f-
| 0ac7b1cc-
+------
mysql> select display_
+------
| display_name | deleted | id | user_id | project_id | status | volume_type_id |
+------
| image-64090ba9-
| test-volume | 1 | 6b4b1bc1-
+------
2 rows in set (0.00 sec)
mysql> select * from volume_types;
+------
| created_at | updated_at | deleted_at | deleted | id | name | qos_specs_id | is_public | description |
+------
| 2021-11-09 02:01:54 | 2021-11-09 02:01:54 | NULL | 0 | 0ac7b1cc-
| 2021-11-09 02:07:28 | NULL | NULL | 0 | afcc773f-
| 2021-12-08 07:22:15 | NULL | NULL | 0 | bd5c3bc5-
+------
3 rows in set (0.00 sec)
```
* stack-for-
```
description: Cinder test
heat_template_
resources:
VirtualStorage:
type: OS::Cinder::Volume
properties:
name: test-volume
image: cirros-
size: 8
volume_type: { get_resource: multi }
multi:
type: OS::Cinder:
properties:
name: test-volumetype
```
* cinder.conf
```
...
[DEFAULT]
cinder_
cinder_
...
[lvmdriver-1]
image_volume_
...
```
I also confirmed the following:
https:/
I thought it might be possible to solve it by creating and using Volume Type for volume cache instead of using the original Volume Type when creating volume cache.
I'm not familiar with cinder, so I'm not sure if it really works...
Please let me know if there is any good solution.
Changed in cinder: | |
importance: | Undecided → Medium |
tags: | added: delete type |
tags: |
added: volume-types removed: type |
tags: | added: cache volume-cache |
tags: | added: image-cache |
Changed in cinder: | |
assignee: | nobody → Tushar Trambak Gite (tushargite96) |