Unable to remove volume type until image cache has been cleared
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
New
|
Low
|
Unassigned | ||
tempest |
Fix Released
|
Undecided
|
Lee Yarwood |
Bug Description
I noticed while writing Tempest tests for bug #1803961 that Tempest wasn't able to reliably clean up volume types while volumes using the type were still present in the image volume cache:
Introduce an attached volume migration test
https:/
Reviewing the cinder code in this area shows that these cache volumes need to be manually deleted by an admin in order for them to then be considered evicted from the cache and no longer in use:
Shouldn't we automatically remove these when the last volume associated to this cached volume is removed?
Running the following Tempest scenario test locally shows this behaviour even while the overall test passes (I'm assuming Tempest is swallowing the failure somewhere?):
$ cd tempest
$ tempest run --regex tempest.
[..]
{0} tempest.
$ openstack volume list --all
+------
| ID | Name | Status | Size | Attached to |
+------
| 2c48d377-
+------
$ openstack volume type list
+------
| ID | Name | Is Public |
+------
| 92642ce1-
| 60827973-
| 6809c94a-
+------
$ openstack volume type delete tempest-
Failed to delete volume type with name or ID 'tempest-
1 of 1 volume types failed to delete.
If this is expected then we can mark this as a bug against Tempest as it would need to remove any remaining volumes from the image volume cache before attempting to delete the volume type.
Changed in tempest: | |
assignee: | nobody → Lee Yarwood (lyarwood) |
status: | New → In Progress |
tags: | added: cache image image-cache volume-type |
Changed in cinder: | |
importance: | Undecided → Low |
I believe this is expected, but I will wait to assign it to tempest to give others a chance to add some input.
It's possible the last volume gets deleted, but it is just a temporary thing and more new volumes will be created after that. In that case, I would not want to flush the volume cache and cause an unnecessary delay on the next volume create.