flavor with empty string id cannot be specified

Bug #1148563 reported by Mitsuhiko Yamazaki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Mitsuhiko Yamazaki

Bug Description

We can create a flavor with empty string id.

But once the flavor is created, it cannot be used or deleted by specifying id/name.

For example:

$ nova flavor-create flavor1 '' 1024 0 1
+----+---------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs |
+----+---------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| | flavor1 | 1024 | 0 | 0 | | 1 | 1.0 | True | N/A |
+----+---------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
$ nova boot --image 4515ae16-f9ca-4eb7-8e20-4c0f34eb0bf8 --flavor '' server01
ERROR: you need to specify a Flavor ID
$ nova boot --image 4515ae16-f9ca-4eb7-8e20-4c0f34eb0bf8 --flavor flavor1 server01
ERROR: No flavor with a name or ID of '' exists.
$ nova flavor-delete ''
ERROR: No flavor with a name or ID of '' exists.
$ nova flavor-delete flavor1
ERROR: Not found (HTTP 404)

Changed in nova:
assignee: nobody → Mitsuhiko Yamazaki (ymzk37)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/23788

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/23788
Committed: http://github.com/openstack/nova/commit/101f0e22c4f118ed54122906508230beaafcae1d
Submitter: Jenkins
Branch: master

commit 101f0e22c4f118ed54122906508230beaafcae1d
Author: Mitsuhiko Yamazaki <email address hidden>
Date: Wed Mar 6 15:03:09 2013 +0900

    Check if flavor id is an empty string

    Now once a flavor is created with empty string id, its id and
    name cannot be specified when we use or delete the flavor.

    This checks if flavorid is empty when creating a new flavor.
    And if so, assigns auto-generated flavorid.

    Fixes bug: 1148563

    Change-Id: Ib48c4cc4ebd993d1f3f3d60a7bb856eff3c279d5

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc1 → 2013.1
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.