Delete flavor should raise error, if it is inuse (any existing vms booted with this flavor)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Won't Fix
|
Undecided
|
Noel Nelson Dsouza |
Bug Description
Version : Juno Devstack
Steps to reproduce.
Step1 : Create an instance with m1.tiny flavor.
stack@onecloud-
+------
| Property | Value |
+------
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | building |
| OS-SRV-
| OS-SRV-
| accessIPv4 | |
| accessIPv6 | |
| adminPass | Uaypcj6qKzbr |
| config_drive | |
| created | 2015-05-
| flavor | m1.tiny (6) |
| hostId | |
| id | 7b4fdada-
| image | cirros-
| key_name | - |
| metadata | {} |
| name | vm1 |
| os-extended-
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tenant_id | d5a7933dfa98430
| updated | 2015-05-
| user_id | a20aaf87a434498
+------
Before deleting flavor please note the above output.
Step 2: Once instance gets active delete the m1.tiny flavor.
stack@onecloud-
+----+-
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-
| 6 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
+----+-
Step 3 : Nova show vmname after deleting the flavor.
stack@onecloud-
+------
| Property | Value |
+------
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | active |
| OS-SRV-
| OS-SRV-
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2015-05-
| flavor | m1.tiny (6) |
| hostId | b2f6e09e63c5ae9
| id | 7b4fdada-
| image | cirros-
| key_name | - |
| metadata | {} |
| name | vm1 |
| os-extended-
| private network | 10.0.0.2 |
| progress | 0 |
| security_groups | default |
| status | ACTIVE |
| tenant_id | d5a7933dfa98430
| updated | 2015-05-
| user_id | a20aaf87a434498
+------
Please note after deleting flavor, nova show command output above.
flavor -- m1.tiny (6) still displaying the same before and after.
Regards
Noel
Changed in nova: | |
assignee: | nobody → Bhavaniprasad (bhavaniprasadadapaka) |
Changed in nova: | |
assignee: | nobody → Noel Nelson Dsouza (noelnelson) |
Changed in nova: | |
status: | In Progress → Confirmed |
status: | Confirmed → Won't Fix |
The old flavors, after having been deleted, still exist in the instance_types table, so this isn't necessarily a problem.
However, if a flavor is deleted, then the instance based on that deleted flavor is migrated, the migration fails.
Should we be discussing a check to make sure a flavor isn't in use before deleting, or making it possible to use deleted flavors for existing instances?