Folsom - Error message for "Create Flavor" when Flavor ID is duplicate is not proper

Bug #1056918 reported by Rajalakshmi Ganesan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Andy McCrae
python-novaclient
Invalid
Undecided
Unassigned

Bug Description

Description:
------------------

Error message thrown while Creating Flavor with duplicate Flavor ID i.e Flavor ID that already exists is not proper.

Environment:
--------------
Folsom

Actual Error Message:
------------------------

Message from API:"message": "Instance Type PS_flavor_2 already exists."
Message from Python Client: ERROR: Instance Type ps_abd already exists. (HTTP 409) (Request-ID: req-b8f6821a-51c2-46a7-bd09-6b4896afd6f4)

Expected Error Message:
----------------------------
Should be something like(When Flavor ID is X)

"message": "Flavor with ID X already exists."

Python Nova client output:
------------------------------

rajalakshmi_ganesan@ubuntu:~$ nova flavor-list
+-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs |
+-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 | True | {} |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True | {} |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True | {} |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True | {} |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True | {} |
| 12 | flavor-12 | 1024 | 10 | 2 | 512 | 2 | 1.0 | True | {} |
| 333 | PS_flavor | 1024 | 10 | 2 | 22 | 2 | 2.0 | True | {} |
+-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
rajalakshmi_ganesan@ubuntu:~$ nova flavor-create ps_abd 333 22 22 22
ERROR: Instance Type ps_abd already exists. (HTTP 409) (Request-ID: req-417f6ed5-72c9-4eef-85e5-cff067931f6e)
rajalakshmi_ganesan@ubuntu:~$

CURL COMMAND OUTPUTS:
--------------------------------

rajalakshmi_ganesan@ubuntu:~$ nova flavor-list
+-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs |
+-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 | True | {} |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True | {} |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True | {} |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True | {} |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True | {} |
| 12 | flavor-12 | 1024 | 10 | 2 | 512 | 2 | 1.0 | True | {} |
| 333 | PS_flavor | 1024 | 10 | 2 | 22 | 2 | 2.0 | True | {} |
+-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
rajalakshmi_ganesan@ubuntu:~$ curl -i http://15.184.64.226:8774/v2/25ecbf309f7748c6a173fabf2a673a65/flavors -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "X-Auth-Token: 0b78256729a848559f7a9a45e24ef554" -d '{"flavor": {"disk": 10, "vcpus": 2, "ram": 1024, "name": "PS_flavor_2", "id": 333, "swap": 22, "os-flavor-access:is_public": true, "rxtx_factor": 2, "OS-FLV-EXT-DATA:ephemeral": 2}}'
HTTP/1.1 409 Conflict
Content-Length: 93
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-08da768b-29bc-4444-8b8d-4ea3111caab7
Date: Wed, 26 Sep 2012 14:48:35 GMT

{"conflictingRequest": {"message": "Instance Type PS_flavor_2 already exists.", "code": 409}}rajalakshmi_ganesan@ubuntu:~$

description: updated
description: updated
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/13751

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

Reviewed: https://review.openstack.org/13751
Committed: http://github.com/openstack/nova/commit/3db7a943bebbda5fea07fc80813cabc436fb892b
Submitter: Jenkins
Branch: master

commit 3db7a943bebbda5fea07fc80813cabc436fb892b
Author: Andy McCrae <email address hidden>
Date: Thu Sep 27 11:58:14 2012 +0000

    Fixes error message for flavor-create duplicate ID

    Fixes bug 1056918

    Change-Id: I516153211504b67f6e8b8ebb138abcef4be4d73e

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Andy McCrae (andrew-mccrae) wrote :

From what I've seen - this is now fixed, the python-novaclient is unaffected, marking that as Invalid.

Changed in python-novaclient:
status: New → Incomplete
status: Incomplete → Invalid
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-1 → 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.