User-created flavors do not enforce flavor id uniqueness
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Won't Fix
|
Low
|
Noel Nelson Dsouza |
Bug Description
The nova API makes an implicit assumption that the "flavorid" field is unique, but under certain circumstances this is not enforced. This results in incorrect behavior in the situation where a deleted flavor's flavorid is re-used for a new flavor. Any instances that are associated to the deleted flavor will now appear to be associated to the new flavor that re-used the id.
Steps to reproduce:
1. Create a flavor named FOO with a flavorid of 5
2. Create an instance using flavor FOO
3. Delete the flavor FOO
4. Create a flavor named BAR with a flavorid of 5
Look at the instance detail for the launched instance
Expected Behavior:
The instance detail says the instance is launched against FOO
Actual Behavior:
The instance detail says the instance is launched against BAR
Changed in nova: | |
status: | New → Confirmed |
importance: | Undecided → Low |
Changed in nova: | |
assignee: | nobody → Noel Nelson Dsouza (noelnelson) |
Changed in nova: | |
status: | In Progress → Won't Fix |
Infos of "flavor" for instance were stored in the nova-db's table "instance_ system_ metadata" . e419-4e82- 9a41-1e7fb69401 15 | instance_ type_memory_ mb | 1024 | 0 | e419-4e82- 9a41-1e7fb69401 15 | instance_type_swap | 0 | 0 | e419-4e82- 9a41-1e7fb69401 15 | instance_ type_vcpu_ weight | NULL | 0 | e419-4e82- 9a41-1e7fb69401 15 | instance_ type_root_ gb | 10 | 0 | e419-4e82- 9a41-1e7fb69401 15 | instance_type_id | 39 | 0 | e419-4e82- 9a41-1e7fb69401 15 | requested_ network_ num | 1 | 0 | e419-4e82- 9a41-1e7fb69401 15 | instance_type_name | FOO | 0 | e419-4e82- 9a41-1e7fb69401 15 | instance_ type_ephemeral_ gb | 0 | 0 | e419-4e82- 9a41-1e7fb69401 15 | instance_ type_rxtx_ factor | 1.0
| 2015-03-01 01:45:29 | NULL | NULL | 3258 | f65c4708-
| 2015-03-01 01:45:29 | NULL | NULL | 3259 | f65c4708-
| 2015-03-01 01:45:29 | NULL | NULL | 3260 | f65c4708-
| 2015-03-01 01:45:29 | NULL | NULL | 3261 | f65c4708-
| 2015-03-01 01:45:29 | NULL | NULL | 3262 | f65c4708-
| 2015-03-01 01:45:29 | NULL | NULL | 3263 | f65c4708-
| 2015-03-01 01:45:29 | NULL | NULL | 3264 | f65c4708-
| 2015-03-01 01:45:29 | NULL | NULL | 3265 | f65c4708-
| 2015-03-01 01:45:29 | NULL | NULL | 3266 | f65c4708-
I think that the flavor info can be got from the "instance_ system_ metadata" table instead of the record of "instance_types" table got by "flavorid".