nova-manage cell_v2 verify_instance returns a valid instance mapping even after the instance is deleted/archived
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Surya Seetharaman | ||
Pike |
Fix Committed
|
Medium
|
Matt Riedemann |
Bug Description
Although nova-manage cell_v2 verify_instance is used to check if the provided instance is correctly mapped to a cell or not, this should not be returning a valid mapping message if the instance itself is deleted. It should return an error message saying 'The instance does not exist'.
Steps to reproduce :
1. Create an instance :
-> nova boot --image 831bb8a0-
-> nova list
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| aec6eb34-
+------
2. Delete the instance :
-> nova delete test
Request to delete server test has been accepted.
-> nova list
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
+------
3. Verify Instance :
-> nova-manage cell_v2 verify_instance --uuid aec6eb34-
Instance aec6eb34-
Basically the message that we get is misleading for a deleted instance. This is because verify_instance queries the instance_mappings table which maintains a mapping of the deleted instances as well.
summary: |
nova-manage cell_v2 verify_instance returns a valid instance mapping - even after the instance is deleted + even after the instance is deleted/archived |
Changed in nova: | |
importance: | Undecided → Medium |
There are other related bugs like below dealing with the existence of information about deleted instances in the instance_mapping table :
1. https:/ /bugs.launchpad .net/nova/ +bug/1722451 /bugs.launchpad .net/nova/ +bug/1679941
2. https:/
However, even if we decide to do a purge operation (https:/ /bugs.launchpad .net/nova/ +bug/1722451/ comments/ 1) , the output of verify_instance for a deleted instance should not be dependent on the purge, IMHO.