getting flavor by id prefers deleted flavors

Bug #1262595 reported by Dirk Mueller
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

After changing my m1.tiny flavor from disk_gb==1 to disk_gb==0 I noticed something strange:

$ nova flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 | True |

Here the correct flavor is being shown. however when looking at it with details:

$ nova flavor-show 1

+----------------------------+---------+
| Property | Value |
+----------------------------+---------+
| name | m1.tiny |
| ram | 512 |
| OS-FLV-DISABLED:disabled | False |
| vcpus | 1 |
| extra_specs | {} |
| swap | |
| os-flavor-access:is_public | True |
| rxtx_factor | 1.0 |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 1 |
| id | 1 |
+----------------------------+---------+

disk_gb (here shown as "disk" is shown as 1. This is because the database query simply returns .first() match, which in my case is returning the deleted instance_type.

lizheming (lizheming-li)
Changed in nova:
assignee: nobody → lizheming (lizheming-li)
Revision history for this message
lizheming (lizheming-li) wrote :
Changed in nova:
assignee: lizheming (lizheming-li) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.