"No flavor with a name or ID of '' exists" reported when call "nova flavor-show {id}"

Bug #1447039 reported by Jerry Cai
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
New
Undecided
Unassigned

Bug Description

Create flavor by the following method:
flavors.create(name, memory, vcpus, root_gb,
                                       ephemeral_gb=ephemeral_gb,
                                       flavorid=flavorid, swap=swap,
                                       rxtx_factor=rxtx_factor,
                                       is_public=is_public)

Created succeeded:
# nova flavor-list
+------------------------------------------+---------------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+------------------------------------------+---------------+-----------+------+-----------+------+-------+-------------+-----------+
| 1 | m1.tiny | 512 | 1 | 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 |
| TT-19e3e819-e68a-4ddf-ac2b-2f8636356603 | TT-Testnew2 | 1024 | 20 | 0 | | 1 | 1.0 | True |
+------------------------------------------+---------------+-----------+------+-----------+------+-------+-------------+-----------+

But failed to show this:
#nova flavor-show TT-19e3e819-e68a-4ddf-ac2b-2f8636356603
ERROR (CommandError): No flavor with a name or ID of 'pvc-19e3e819-e68a-4ddf-ac2b-2f8636356603' exists.

This error also happend when boot vm, it shows cannot find the flavor, boot failed:
# nova boot --flavor TT-Testnew --image RHEL6.5 --nic net-id=3ccfc448-ee59-4b36-94c1-57b76fa84b26,v4-fixed-ip=192.168.2.201 sles-april21-jerry2
ERROR (CommandError): No flavor with a name or ID of 'tt-e835a885-e61c-48d7-af23-d4e5dbf04710' exists.

I think this is a critical issue, please help, thanks.

--------------------
1. version:
[root@controller ~]# rpm -aq | grep nova
openstack-nova-conductor-2015.1-201504161438.ibm.el7.111.noarch
openstack-nova-network-2015.1-201504161438.ibm.el7.111.noarch
openstack-nova-cells-2015.1-201504161438.ibm.el7.111.noarch
python-novaclient-2.23.0-1.ibm.el7.noarch
openstack-nova-scheduler-2015.1-201504161438.ibm.el7.111.noarch
openstack-nova-novncproxy-2015.1-201504161438.ibm.el7.111.noarch
openstack-nova-objectstore-2015.1-201504161438.ibm.el7.111.noarch
python-nova-2015.1-201504161438.ibm.el7.111.noarch
openstack-nova-api-2015.1-201504161438.ibm.el7.111.noarch
openstack-nova-console-2015.1-201504161438.ibm.el7.111.noarch
openstack-nova-compute-prereqs-2013.1-201503192011.ibm.2.ppc64
openstack-nova-compute-2015.1-201504161438.ibm.el7.111.noarch
openstack-nova-common-2015.1-201504161438.ibm.el7.111.noarch
openstack-nova-cert-2015.1-201504161438.ibm.el7.111.noarch
openstack-nova-2015.1-201504161438.ibm.el7.111.noarch

2. logs:
only this in nova-api.log
2015-04-22 04:24:03.051 28320 INFO nova.api.openstack.wsgi [req-09ce810d-fb83-4102-b137-42ea9d67c4dc 1cabd0c96f2c48599ca4220b9b9d3f8f 2a0dc745a17f4b3b9c3b99b3df95084e - - -] HTTP exception thrown: The resource could not be found.

3. 1) Create a flavor by the code above, then type the cmd as above.

Revision history for this message
jichenjc (jichenjc) wrote :

confused by your input sorry

you got following
TT-19e3e819-e68a-4ddf-ac2b-2f8636356603 | TT-Testnew2

but you are using
#nova flavor-show PVC-19e3e819-e68a-4ddf-ac2b-2f8636356603

This error also happend when boot vm, it shows cannot find the flavor, boot failed:
# nova boot --flavor TT-Testnew --image RHEL6.5 --nic net-id=3ccfc448-ee59-4b36-94c1-57b76fa84b26,v4

Changed in nova:
status: New → Incomplete
Revision history for this message
Jerry Cai (caimin) wrote :

Sorry @jichenjc, I just wanted to replace some words to avoid show sensitive information but missed that part, and now description is fixed. It was the exactly the flavor id I want to show, but failed with "flavor id not existed".

description: updated
Changed in nova:
status: Incomplete → New
Revision history for this message
jichenjc (jichenjc) wrote :

I got following error

jichen@ubuntu:~$ nova flavor-create TT-Testnew2 TT-19e3e819-e68a-4ddf-ac2b-2f8636356603 1024 20 1
+-----------------------------------------+-------------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+-----------------------------------------+-------------+-----------+------+-----------+------+-------+-------------+-----------+
| TT-19e3e819-e68a-4ddf-ac2b-2f8636356603 | TT-Testnew2 | 1024 | 20 | 0 | | 1 | 1.0 | True |
+-----------------------------------------+-------------+-----------+------+-----------+------+-------+-------------+-----------+
jichen@ubuntu:~$ nova flavor-show TT-19e3e819-e68a-4ddf-ac2b-2f8636356603
ERROR (BadRequest): The server could not comply with the request since it is either malformed or otherwise incorrect. (HTTP 400) (Request-ID: req-48db62c5-62d7-431b-b21e-5a020d551abc)

so I think it's a bug that we should check ID first

Revision history for this message
jichenjc (jichenjc) wrote :

we should not allow TT-19e3e819-e68a-4ddf-ac2b-2f8636356603
to be created if later it can't be used ...
or if the name is valid, we need to allow the 'show' command

Changed in nova:
assignee: nobody → jichenjc (jichenjc)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
jichenjc (jichenjc) wrote :

seems Juno version don't have this problem ...

Revision history for this message
jichenjc (jichenjc) wrote :

after long time debug , it's a duplication of
https://bugs.launchpad.net/python-novaclient/+bug/1446850

2015-04-24 20:23:31.288 INFO nova.osapi_compute.wsgi.server [req-841bb7cd-d07c-41c6-bbde-cc0d7901946b demo demo] 192.168.122.157 "GET /v2/ec4b7d36167e4f278c72a1e2e066e63b/flavors/tt-19e3e819-e68a-4ddf-ac2b-2f8636356603 HTTP/1.1" status: 400 len: 338 time: 2.582629

it's translated to lower case ....

jichenjc (jichenjc)
Changed in nova:
assignee: jichenjc (jichenjc) → nobody
Revision history for this message
melanie witt (melwitt) wrote :

Hi Jerry, this is a bug in the novaclient. A fix has been committed, but not yet released. You can work around by using novaclient version 2.22.0 until the next release happens containing the fix.

no longer affects: nova
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.