flavor not found

asked 2017-05-05 17:59:25 -0500

vamfoom gravatar image

I would appreciate if someone could help me troubleshoot this problem. First of all, the controller and controller nodes are on separate machines. The error from below is from the controller node. I'm in the process of trying to create my first instance/server in openstack.

server list shows this:

+--------------------------------------+----------------------+--------+----------+------------+
| ID                                   | Name                 | Status | Networks | Image Name |
+--------------------------------------+----------------------+--------+----------+------------+
| cadc29fd-5e5a-4ed6-acfe-c9a2bcdabb67 | selfservice-instance | ERROR  |          | cirros     |
+--------------------------------------+----------------------+--------+----------+------------+

The only issue I found in the nova log is this:

2017-04-28 20:24:45.183 12342 INFO nova.osapi_compute.wsgi.server [req-9c153b69-ef41-4b21-ad68-09a0b48b46e8 - - - - -] 16.89.91.110 "GET /v2.1/0b67c9437d564ca78f63524ef0290337/flavors/m1.
nano HTTP/1.1" status: 404 len: 434 time: 0.8761010
2017-04-28 20:24:45.208 12342 INFO nova.api.openstack.wsgi [req-bd813005-75ee-44ff-982a-53a844f07511 - - - - -] HTTP exception thrown: Flavor m1.nano could not be found.

But listing the flavor shows it's there:

+----+---------+-----+------+-----------+-------+-----------+
| ID | Name    | RAM | Disk | Ephemeral | VCPUs | Is Public |
+----+---------+-----+------+-----------+-------+-----------+
| 0  | m1.nano |  64 |    1 |         0 |     1 | True      |
+----+---------+-----+------+-----------+-------+-----------+

listing of images:

+--------------------------------------+--------+--------+
| ID                                   | Name   | Status |
+--------------------------------------+--------+--------+
| 882e1219-9977-4afb-9cc2-8f924d3ccbc9 | cirros | active |
+--------------------------------------+--------+--------+

What am I missing? I am seeing that it's tring to grab "b67c9437d564ca78f63524ef0290337/flavors/m1.nano". Which ID is this? b67c9437d564ca78f63524ef0290337

edit retag flag offensive close merge delete

Comments

b67c943... is your project's UUID.

The API doc requires the flavor ID instead of the name. But if so, I wonder how the name got into the API request? How did you launch the instance?

Bernd Bausch gravatar imageBernd Bausch ( 2017-05-05 18:52:20 -0500 )edit

I launched it from the command-line following the Ocata tutorial.

vamfoom gravatar imagevamfoom ( 2017-05-05 18:58:32 -0500 )edit

I just realized now that the flavor ID above is zero. I never thought to consult the API doc, being new to openstack. Let me delete the instance and try again.

vamfoom gravatar imagevamfoom ( 2017-05-05 19:00:52 -0500 )edit

This is the command in the tutorial doc for Ocata (flavor is a name):

openstack server create --flavor m1.nano --image cirros \
  --nic net-id=SELFSERVICE_NET_ID --security-group default \
  --key-name mykey selfservice-instance
vamfoom gravatar imagevamfoom ( 2017-05-05 19:15:24 -0500 )edit

I tried it on my Ocata cloud, which I created based on the same tutorial. Strangely, my Nova endpoints don't include the project ID. Adding --debug to the server create command, I see:

GET http://controller:8774/v2.1/flavors/m1.tiny

which fails. This is retried 3 times or so. Then:

Bernd Bausch gravatar imageBernd Bausch ( 2017-05-05 22:35:25 -0500 )edit