Ask Your Question
0

Nova: flavor / image could not be found by name, but is ok by UUID

asked 2017-02-07 05:47:22 -0500

doka.ua gravatar image

Hi colleagues,

when launching VM using such CLI command:

openstack server create --flavor Beta --image trusty --nic net-id=vxnet vxVM

there are such messages in nova-api.conf:

Tried request by name, got 404:

11:18:38.714 nova.api.openstack.wsgi [req-637b ...] HTTP exception thrown: Image not found.
11:18:38.715 nova.osapi_compute.wsgi.server [req-637b ...] 10.0.10.10 "GET /v2.1/a82afa4f33bd499cb910b90b24057fbb/images/trusty HTTP/1.1" status: 404 len: 392 time: 0.7216489

Next time, tried request by name, got 404

11:18:38.735 nova.api.openstack.wsgi [req-be89 ...] HTTP exception thrown: Image not found.
11:18:38.736 nova.osapi_compute.wsgi.server [req-be89 ...] 10.0.10.10 "GET /v2.1/a82afa4f33bd499cb910b90b24057fbb/images/trusty HTTP/1.1" status: 404 len: 392 time: 0.0185308

Asked for images list, got 200 and list of images:

11:18:38.781 nova.osapi_compute.wsgi.server [req-0750 ...] 10.0.10.10 "GET /v2.1/a82afa4f33bd499cb910b90b24057fbb/images HTTP/1.1" status: 200 len: 1295 time: 0.0427790

Then asked by UUID, got 200:

11:18:38.813 nova.osapi_compute.wsgi.server [req-18f4 ...] 10.0.10.10 "GET /v2.1/a82afa4f33bd499cb910b90b24057fbb/images/a510626d-aaf9-44b5-b4a4-e214f88bcf4a HTTP/1.1" status: 200 len: 988 time: 0.0292041

Exactly same behaviour when asking for flavor:

11:18:38.839 nova.api.openstack.wsgi [req-4975 ...] HTTP exception thrown: Flavor Beta could not be found.
11:18:38.840 nova.osapi_compute.wsgi.server [req-4975 ...] 10.0.10.10 "GET /v2.1/a82afa4f33bd499cb910b90b24057fbb/flavors/Beta HTTP/1.1" status: 404 len: 408 time: 0.0249388
11:18:38.861 nova.api.openstack.wsgi [req-ade6 ...] HTTP exception thrown: Flavor Beta could not be found.
11:18:38.862 nova.osapi_compute.wsgi.server [req-ade6 ...] 10.0.10.10 "GET /v2.1/a82afa4f33bd499cb910b90b24057fbb/flavors/Beta HTTP/1.1" status: 404 len: 408 time: 0.0188961
11:18:38.889 nova.osapi_compute.wsgi.server [req-fd25 ...] 10.0.10.10 "GET /v2.1/a82afa4f33bd499cb910b90b24057fbb/flavors HTTP/1.1" status: 200 len: 1695 time: 0.0246189
11:18:38.903 nova.osapi_compute.wsgi.server [req-f238 ...] 10.0.10.10 "GET /v2.1/a82afa4f33bd499cb910b90b24057fbb/flavors/199f7002-0561-4d59-aedf-50c8f6533361 HTTP/1.1" status: 200 len: 834 time: 0.0117750
while both flavor and image are available when asking for them using CLI, e.g.
# openstack image list                                                                                                                                 
+--------------------------------------+------------+--------+
| ID                                   | Name       | Status |
+--------------------------------------+------------+--------+
| a510626d-aaf9-44b5-b4a4-e214f88bcf4a | trusty     | active |
+--------------------------------------+------------+--------+

# openstack image show trusty
+------------------+--------------------------------------+
| Field            | Value                                |
+------------------+--------------------------------------+
| disk_format      | raw                                  |
| id               | a510626d-aaf9-44b5-b4a4-e214f88bcf4a |
[ ... ]

# openstack flavor show Beta
+----------------------------+--------------------------------------+
| Field                      | Value                                |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled   | False                                |
| access_project_ids         | None                                 |
| id                         | 199f7002-0561-4d59-aedf-50c8f6533361 |
| name                       | Beta                                 |
| os-flavor-access:is_public | True                                 |
| [ ... ]                    |                                      |
+----------------------------+--------------------------------------+

So, why Nova can't access these object by name, while is able to get by UUDI? What's wrong with what?

Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-02-07 09:10:43 -0500

volenbovsky gravatar image

Hi,

I think that your credentials are different in API vs. CLI, most likely in tenant part. That is your rights allow you to list VMs Unless something has changed - even you are 'admin', but try to get resources from different tenant - it needs UUID. (I could think of it as feature to allow fully-not-noticeable possible duplication of names between tenants)

edit flag offensive delete link more

Comments

Frankly, I don't remember whether it's possible to assign so particular access rights. It seems I never seen this in documentation. In my case it's presumably Nova lacks rights to access Leystone and Glance. Could you, please, point on the documentation where this can be described? Thanks!

doka.ua gravatar imagedoka.ua ( 2017-02-11 08:40:46 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-02-07 05:47:22 -0500

Seen: 610 times

Last updated: Feb 07 '17