[Openstack] openstack server create: dictionary update sequence element #0 has length 1; 2 is required

Andrew Boring andrew at andrewboring.com
Wed Jul 6 00:18:11 UTC 2016


TL;DR: 
openstack server create = error
nova boot = success



New install, RDO/Mitaka, CentOS 7.x
All endpoint/hostnames resolve to the internal/private IP(s) via /etc/hosts.

[root at vmcontrol ~]# openstack --version
openstack 2.6.0


Following basic RDO install guide with Keystone, Glance, Nova, and Neutron, followed by verifying operation with “Launch an instance":

[root at vmcontrol ~]# . demo-openrc 

[root at vmcontrol ~]# openstack server create --flavor m1.tiny --image cirros --nic d92019ea-dd4f-450d-a668-f8b942256735 --security-group default --key-name mykey newinstance
dictionary update sequence element #0 has length 1; 2 is required


Googling for error "dictionary update sequence element #0 has length 1; 2 is required” yield various python issues, but not many specific to OpenStack. 


But, nova boot works just fine:
root at vmcontrol ~]# nova boot --flavor m1.tiny --image cirros --nic net-id=d92019ea-dd4f-450d-a668-f8b942256735 --security-group default --key-name mike newinstance

[root at vmcontrol ~]# nova list
+--------------------------------------+-------------+--------+------------+-------------+-------------------------+
| ID                                   | Name        | Status | Task State | Power State | Networks                |
+--------------------------------------+-------------+--------+------------+-------------+-------------------------+
| e84d9f30-b8a4-43c8-b4e5-b98b0837226c | newinstance | ACTIVE | -          | Running     | selfservice=172.168.1.4 |
+--------------------------------------+-------------+--------+------------+-------------+-------------------------+


Add some debug to openstack server create:
[root at vmcontrol ~]# openstack --debug server create --flavor m1.tiny --image cirros --nic d92019ea-dd4f-450d-a668-f8b942256735 --security-group default --key-name mykey newinstance

Full output here:
http://pastebin.com/WikH3Qkf


Some interesting 404s from the debug output:

"GET /v2.1/d8395cb74614432aa326ce3def998551/images/cirros HTTP/1.1" 404 62
RESP: [404] X-Openstack-Nova-Api-Version: 2.1 Vary: X-OpenStack-Nova-API-Version Content-Type: application/json; charset=UTF-8 Content-Length: 62 X-Compute-Request-Id: req-a914048d-f8c7-420f-8d8e-7396d9d5b38f Date: Tue, 05 Jul 2016 23:01:06 GMT Connection: keep-alive 
RESP BODY: {"itemNotFound": {"message": "Image not found.", "code": 404}}


and yet:


[root at vmcontrol ~]# glance image-list
+--------------------------------------+--------+
| ID                                   | Name   |
+--------------------------------------+--------+
| a46b2bcc-895d-4d09-8311-28726c12dd00 | cirros |
+--------------------------------------+————+

[root at vmcontrol ~]# nova image-list
WARNING: Command image-list is deprecated and will be removed after Nova 15.0.0 is released. Use python-glanceclient or openstackclient instead.
+--------------------------------------+--------+--------+--------+
| ID                                   | Name   | Status | Server |
+--------------------------------------+--------+--------+--------+
| a46b2bcc-895d-4d09-8311-28726c12dd00 | cirros | ACTIVE |        |
+--------------------------------------+--------+--------+————+

[root at vmcontrol ~]# openstack image list
+--------------------------------------+--------+--------+
| ID                                   | Name   | Status |
+--------------------------------------+--------+--------+
| a46b2bcc-895d-4d09-8311-28726c12dd00 | cirros | active |
+--------------------------------------+--------+--------+


The flavor m1.tiny shows a similar 404 in the debug output. Both the "openstack flavor list" and “nova flavor-list" commands both show the flavor available.

Some glance registry logs around the time of the various commands above shows both 404 and  200:

2016-07-05 18:56:07.725 7585 INFO eventlet.wsgi.server [req-a8cc231b-38ad-477b-9941-732a1bf66cfd 6e594643f232411499d9bc86ec2d5fff d8395cb74614432aa326ce3def998551 - - -] 127.0.0.1 - - [05/Jul/2016 18:56:07] "GET /images/a46b2bcc-895d-4d09-8311-28726c12dd00 HTTP/1.1" 200 907 0.926838
2016-07-05 19:01:06.710 7585 INFO glance.registry.api.v1.images [req-3ae70051-515f-4d11-ab4a-e5a2f8916bf9 6e594643f232411499d9bc86ec2d5fff d8395cb74614432aa326ce3def998551 - - -] Image cirros not found
2016-07-05 19:01:06.712 7585 INFO eventlet.wsgi.server [req-3ae70051-515f-4d11-ab4a-e5a2f8916bf9 6e594643f232411499d9bc86ec2d5fff d8395cb74614432aa326ce3def998551 - - -] 127.0.0.1 - - [05/Jul/2016 19:01:06] "GET /images/cirros HTTP/1.1" 404 242 0.425510
2016-07-05 19:01:07.096 7585 INFO eventlet.wsgi.server [req-5fd77888-5d12-49f4-84e2-9d8f423fd2ea 6e594643f232411499d9bc86ec2d5fff d8395cb74614432aa326ce3def998551 - - -] 127.0.0.1 - - [05/Jul/2016 19:01:07] "GET /images/detail?is_public=none&limit=20 HTTP/1.1" 200 910 0.351272



and the nova-api log from another attempt using “openstack server create":

2016-07-05 19:37:51.827 8048 INFO nova.osapi_compute.wsgi.server [req-a8e3ad7a-7a5b-4fde-a8a5-36d9b165c62f 6e594643f232411499d9bc86ec2d5fff d8395cb74614432aa326ce3def998551 - - -] 192.168.21.5 "GET /v2.1/d8395cb74614432aa326ce3def998551/images/a46b2bcc-895d-4d09-8311-28726c12dd00 HTTP/1.1" status: 200 len: 980 time: 0.3358560
2016-07-05 19:37:51.856 8048 INFO nova.api.openstack.wsgi [req-59f2d215-b3eb-4e53-a2ff-16dfc86a8cad 6e594643f232411499d9bc86ec2d5fff d8395cb74614432aa326ce3def998551 - - -] HTTP exception thrown: Flavor m1.tiny could not be found.
2016-07-05 19:37:51.857 8048 INFO nova.osapi_compute.wsgi.server [req-59f2d215-b3eb-4e53-a2ff-16dfc86a8cad 6e594643f232411499d9bc86ec2d5fff d8395cb74614432aa326ce3def998551 - - -] 192.168.21.5 "GET /v2.1/d8395cb74614432aa326ce3def998551/flavors/m1.tiny HTTP/1.1" status: 404 len: 369 time: 0.0232220
2016-07-05 19:37:51.892 8048 INFO nova.osapi_compute.wsgi.server [req-450b6080-4831-427e-bdd2-1bd6b67a000f 6e594643f232411499d9bc86ec2d5fff d8395cb74614432aa326ce3def998551 - - -] 192.168.21.5 "GET /v2.1/d8395cb74614432aa326ce3def998551/flavors HTTP/1.1" status: 200 len: 1920 time: 0.0280991
2016-07-05 19:37:51.923 8048 INFO nova.osapi_compute.wsgi.server [req-2cf863a8-205a-47bb-b52f-409d75464696 6e594643f232411499d9bc86ec2d5fff d8395cb74614432aa326ce3def998551 - - -] 192.168.21.5 "GET /v2.1/d8395cb74614432aa326ce3def998551/flavors/1 HTTP/1.1" status: 200 len: 720 time: 0.0257459


I spent a good part of today running through configs and correcting a number of typos/errors to address other issues (like “nova image-list”), but still can’t figure this one out. 
What else should I check?


Thanks, 
Andrew





More information about the Openstack mailing list