Ask Your Question
0

Unexpected API Error when trying to create an instance

asked 2016-11-23 06:14:55 -0600

Szymon Gwio gravatar image

When I try to create an instance using:

openstack server create --flavor m1.nano --image cirros --nic net-id=3d7e6271-9468-449e-9a5b-8b286625c399 --security-group default --key-name mykey instance1


I get an error like this:

Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'neutronclient.common.exceptions.Unauthorized'> (HTTP 500) (Request-ID: req-b4bdf53e-d68a-40ef-83a2-38bc975add96)

I checked neutron.conf and didn't forget to configure auth_type=password

nova-api log:

2016-11-10 18:21:12.077 32723 INFO nova.api.openstack.wsgi [req-fc20cec3-2592-4bb4-9d53-0329272a4751 3e3255b5e7fa47c2bc6679333026074d 9a3862ac51844810a2a4c578adc769ef - -
-] HTTP exception thrown: Image not found. 2016-11-10 18:21:12.079 32723 INFO nova.osapi_compute.wsgi.server [req-fc20cec3-2592-4bb4-9d53-0329272a4751 3e3255b5e7fa47c2bc6679333026074d 9a3862ac51844810a2a4c578adc769ef - -
-] 9.143.126.249 "GET /v2.1/9a3862ac51844810a2a4c578adc769ef/images/cirros HTTP/1.1" status: 404 len: 351 time:
1.8910210 2016-11-10 18:21:12.164 32723 INFO nova.osapi_compute.wsgi.server [req-fd4a9da7-712d-416b-9c28-d512f988a422 3e3255b5e7fa47c2bc6679333026074d 9a3862ac51844810a2a4c578adc769ef - -
-] 9.143.126.249 "GET /v2.1/9a3862ac51844810a2a4c578adc769ef/images HTTP/1.1" status: 200 len: 768 time:
0.0817139 2016-11-10 18:21:12.217 32723 INFO nova.osapi_compute.wsgi.server [req-92244014-b5d3-44c5-a6f7-3b449839a9ba 3e3255b5e7fa47c2bc6679333026074d 9a3862ac51844810a2a4c578adc769ef - -
-] 9.143.126.249 "GET /v2.1/9a3862ac51844810a2a4c578adc769ef/images/3ac2da74-6c86-4d57-aa5f-3665648a2502 HTTP/1.1" status: 200 len: 949 time:
0.0490708 2016-11-10 18:21:12.254 32723 INFO nova.api.openstack.wsgi [req-8409c001-baf0-44c0-8237-9ae8d4fbd024 3e3255b5e7fa47c2bc6679333026074d 9a3862ac51844810a2a4c578adc769ef - -
-] HTTP exception thrown: Flavor m1.tiny could not be found. 2016-11-10 18:21:12.255 32723 INFO nova.osapi_compute.wsgi.server [req-8409c001-baf0-44c0-8237-9ae8d4fbd024 3e3255b5e7fa47c2bc6679333026074d 9a3862ac51844810a2a4c578adc769ef - -
-] 9.143.126.249 "GET /v2.1/9a3862ac51844810a2a4c578adc769ef/flavors/m1.tiny HTTP/1.1" status: 404 len: 369 time:
0.0351880 2016-11-10 18:21:12.282 32723 INFO nova.osapi_compute.wsgi.server [req-bc5bd1b9-5d22-4dd5-8a0b-021f7647c028 3e3255b5e7fa47c2bc6679333026074d 9a3862ac51844810a2a4c578adc769ef - -
-] 9.143.126.249 "GET /v2.1/9a3862ac51844810a2a4c578adc769ef/flavors HTTP/1.1" status: 200 len: 1488 time:
0.0239038 2016-11-10 18:21:12.305 32723 INFO nova.osapi_compute.wsgi.server [req-4e5ce690-abb6-42c5-8685-dc0d3b039d22 3e3255b5e7fa47c2bc6679333026074d 9a3862ac51844810a2a4c578adc769ef - -
-] 9.143.126.249 "GET /v2.1/9a3862ac51844810a2a4c578adc769ef/flavors/1 HTTP/1.1" status: 200 len: 688 time:
0.0200341 2016-11-10 18:21:12.998 32723 ERROR nova.api.openstack.extensions [req-dcf89316-cc34-4d76-b016-c009744a2f1a 3e3255b5e7fa47c2bc6679333026074d 9a3862ac51844810a2a4c578adc769ef - -
-] Unexpected exception in API method 2016-11-10 18:21:12.998 32723 ERROR nova.api.openstack.extensions Traceback (most recent call last): 2016-11-10 18:21:12.998 32723 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/extensions.py", line 478, in wrapped 2016-11-10 18:21:12.998 32723 ERROR nova.api.openstack.extensions     return f(*args, **kwargs) 2016-11-10 18:21:12.998 32723 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 73, in wrapper 2016-11-10 18:21:12.998 32723 ERROR nova.api.openstack.extensions     return func(*args, **kwargs) 2016-11-10 18:21:12.998 32723 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 73, in wrapper 2016-11-10 18:21:12.998 32723 ERROR nova.api.openstack.extensions     return func(*args, **kwargs) 2016-11-10 18:21:12.998 32723 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2016-11-23 18:59:30 -0600

updated 2016-11-23 19:00:12 -0600

This indicates that you didn't tell Nova how to authenticate with Neutron. This is done in the [neutron] section in nova.conf; see http://docs.openstack.org/newton/conf....

But I see other errors - image not found, flavor not found. I wonder if they are relevant?

edit flag offensive delete link more
0

answered 2017-01-25 05:08:38 -0600

benhart gravatar image

Those are common errors you ahould detect early.. In my project we tend to use the checkmarx security. It does everything quite well. No such errors for me since then..

edit flag offensive delete link more

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: 2016-11-23 06:14:55 -0600

Seen: 3,172 times

Last updated: Jan 25 '17