flavor-recreate-bug
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Opinion
|
Wishlist
|
Unassigned |
Bug Description
I re-created a flavor that is the same 'flavorid' on before and after.
After re-creation, the flavor value of the instance, that created by the 'flavorid', was changed to the new flavor value.
Currently, the flavor value of the instance is refer to 'flavorid'. In this case, it should be refer to 'id', not 'flavorid'.
In database scheme, id is really unique but flavorid is perform the conflict.
Logs are here:
admin@host:~$ nova show vm1
+------
| Property | Value |
+------
| NET1 network | 10.0.10.100 |
| 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 | |
| created | 2014-05-
| flavor | m1.test (10) | <- original
| hostId | 852bf49aacad06f
| id | bbd0b20d-
| image | cirros (87a7ff8d-
| key_name | - |
| metadata | {} |
| name | vm1 |
| os-extended-
| progress | 0 |
| security_groups | default, default |
| status | ACTIVE |
| tenant_id | 177be698aaa4431
| updated | 2014-05-
| user_id | bea0bdab5dfa4f9
+------
gadmin@
+----+-
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-
| 10 | m1.test | 1200 | 12 | 0 | | 8 | 1.0 | True |
+----+-
admin@host:~$ nova flavor-create m2.test 10 1200 12 8
+----+-
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-
| 10 | m2.test | 1200 | 12 | 0 | | 8 | 1.0 | True |
+----+-
admin@host:~$ nova show vm1
+------
| Property | Value |
+------
| NET1 network | 10.0.10.100 |
| 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 | |
| created | 2014-05-
| flavor | g2.test (10) | <- flavor is CHANGED to incorrect value!
| hostId | 852bf49aacad06f
| id | bbd0b20d-
| image | cirros (87a7ff8d-
| key_name | - |
| metadata | {} |
| name | vm1 |
| os-extended-
| progress | 0 |
| security_groups | default, default |
| status | ACTIVE |
| tenant_id | 177be698aaa4431
| updated | 2014-05-
| user_id | bea0bdab5dfa4f9
+------
mysql> SELECT id,flavorid,
+----+-
| id | flavorid | name | deleted |
+----+-
| 6 | 10 | g1.test | 6 |
| 7 | 10 | g2.test | 0 |
+----+-
tags: | added: api |
Changed in nova: | |
assignee: | nobody → Thang Pham (thang-pham) |
Changed in nova: | |
status: | New → Confirmed |
Changed in nova: | |
importance: | Undecided → Medium |
Changed in nova: | |
assignee: | Thang Pham (thang-pham) → nobody |
status: | In Progress → Confirmed |
importance: | Medium → Wishlist |
I have looked at this bug, and it seems that a possible solution might be to prevent a user from deleting a flavor that is in use. This is because it may cause problems as described above or resize problems. What is your opinion on it?