heat stack-create results image too many values to unpack

Asked by smarta94

When I try to launch a simple 1-server stack using heat stack-create, I receive an error about too many values to unpack fro the image. I have tried with the -P "ImageID=...;netID=...;..." as well as -P for each parameter individually. Both result in the same error. What is the resolution to this? I cannot seem to find anything on existing questions about this other than not associating the number of items in a list with the calls too them -- but the template I am using for the yml file is the one provided by the documentation.

My terminal output for what I have tried:

glance --os-username testuser --os-password my_password --os-tenant-name openstack_user --os-auth-url http://controller:5000/v2.0 image-list +--------------------------------------+--------------+-------------+------------------+-----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
| 3483ef43-2a3b-4162-8f47-5f9d09f39bcb | centos6.4 | qcow2 | bare | 349306880 | active |
| 1360e134-2c2b-460e-83fe-ffef2ce89084 | Centos6.6 | qcow2 | bare | 352256000 | active |
| c2fb948a-625c-4596-9a3e-7839707ddcad | centos7 | qcow2 | bare | 739226624 | active |

nova --os-username testuser --os-tenant-name openstack_user --os-auth-url http://controller:5000/v2.0/ net-list
OS Password:
| ID | Label | CIDR |
| 0a6cfc57-81ba-4f13-908c-652cd67e62c0 | private | None |
| 5835a57c-f02b-414c-9a10-2250ce90a230 | my_net | None |
| cf286e01-02c1-47b3-8161-4782023fbf24 | public | None |

heat --debug --os-username testuser --os-password my_password --os-tenant-name openstack_user --os-auth-url http://controller:5000/v2.0 stack-create -f test-stack.yml -P "ImageID=Centos6.6;NetID=5835a57c-f02b-414c-9a10-2250ce90a230;flavor=default-CentOS" My_Stack1
DEBUG (session) REQ: curl -g -i -X GET http://controller:5000/v2.0 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
INFO (connectionpool) Starting new HTTP connection (1): controller
DEBUG (connectionpool) "GET /v2.0 HTTP/1.1" 200 422
DEBUG (session) RESP: [200] date: Mon, 18 May 2015 15:44:13 GMT vary: X-Auth-Token content-length: 422 content-type: application/json connection: keep-alive
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}, {"base": "application/xml", "type": "application/vnd.openstack.identity-v2.0+xml"}], "id": "v2.0", "links": [{"href": "http://controller::5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}

DEBUG (v2) Making authentication request to http://controller:5000/v2.0/tokens
DEBUG (connectionpool) "POST /v2.0/tokens HTTP/1.1" 200 4687
DEBUG (session) REQ: curl -g -i -X POST -H "X-Auth-Key: Luther" -H "X-Auth-User: testuser" -H "User-Agent: python-heatclient" -H "Content-Type: application/json" -H "X-Auth-Url: http://controller:5000/v2.0" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}7d1c47d00b6e6afb45935916074a5cf2eed68ec8" -d '{"files": {}, "disable_rollback": true, "parameters": {"flavor": "default-CentOS", "NetID": "5835a57c-f02b-414c-9a10-2250ce90a230", "ImageID": "Centos6.6"}, "stack_name": "My_Stack1", "environment": {}, "template": {"outputs": {"private_ip": {"description": "IP address of the server in the private network", "value": {"get_attr": ["server", "first_address"]}}}, "heat_template_version": "2014-10-16", "description": "A simple server.", "parameters": {"flavor": {"type": "string", "description": "Flavor to use for the new server VM"}, "ImageID": {"type": "string", "description": "Image to use for the Server"}, "NetID": {"type": "string", "description": "Network ID for the server"}}, "resources": {"my_server": {"type": "OS::Nova::Server", "properties": {"flavor": {"get_param": "flavor"}, "name": "SimpleTestServer", "image": {"get_param": "ImageID"}, "networks": [{"network": {"get_param": "NetID"}}]}}}}}'
INFO (connectionpool) Starting new HTTP connection (1):
DEBUG (connectionpool) "POST /v1/8df11859bd554dc4bc3d6b7f824cf5d6/stacks HTTP/1.1" 400 904
DEBUG (session) RESP:
Traceback (most recent call last):
  File "/usr/bin/heat", line 10, in <module>
  File "/usr/lib/python2.7/site-packages/heatclient/shell.py", line 656, in main
  File "/usr/lib/python2.7/site-packages/heatclient/shell.py", line 606, in main
    args.func(client, args)
  File "/usr/lib/python2.7/site-packages/heatclient/v1/shell.py", line 114, in do_stack_create
  File "/usr/lib/python2.7/site-packages/heatclient/v1/stacks.py", line 119, in create
    data=kwargs, headers=headers)
  File "/usr/lib/python2.7/site-packages/heatclient/common/http.py", line 254, in json_request
    resp = self._http_request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/heatclient/common/http.py", line 344, in _http_request
    raise exc.from_response(resp)
heatclient.exc.HTTPBadRequest: ERROR: Property error : my_server: image too many values to unpack

my yml file:
heat_template_version: 2014-10-16
description: A simple server.

    type: string
    description: Image to use for the Server

    type: string
    description: Network ID for the server

    type: string
    description: Flavor to use for the new server VM

    type: OS::Nova::Server
      name: "SimpleTestServer"
      flavor: {get_param: flavor }
      image: {get_param: ImageID }
      - network: { get_param: NetID }

    description: IP address of the server in the private network
    value: { get_attr: [ server, first_address ] }

Question information

English Edit question
Ubuntu heat Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
Ekaterina Chernova (efedorova) said :

Please, check that image name is unique.

Revision history for this message
smarta94 (smarta94) said :

I have recreated the image after some modifications to it, and deleted and re glance create-image'd it, but there exists only one with that name that is not deleted. If the heat queries the mysql database, shouldn't using the image-id instead of the name (as I have tried) work or do I need to somehow clear old listings from the database?

Revision history for this message
Ekaterina Chernova (efedorova) said :

If you has specified id instead of name in template, the problem is not connected to image names )

Revision history for this message
smarta94 (smarta94) said :

So where would the problem be coming from then? I had tried image-id because I suspected it wasn't resolving the name direclty correclty but ran into the same error.

Revision history for this message
smarta94 (smarta94) said :

Does the heat create-stack require a yaml template defined differently for a single server using neutron networking as opposed to nova networking? He image too manyvalues to unpack suggests the issue is with the glance image declaration somehow, but I noticed in the sample deployment files that teh more complex templates have a neturon::Port option that is linked to by the Nova::Server.

I don't think this has any connection to the problem but thought I would see what others thought?

Revision history for this message
smarta94 (smarta94) said :

I have created another image with the same name and then it thows a different error: Property error: server: image Multiple physical resources were found with name (.....).

I did this by setting up a second controller in a vm without any computer nodes associated to test if my yml file works at all or not -- and it seems to work fine on there, and multiple images with same name then deleting one it works again.

What sort of configuration would cause my physcial server host to have an error of:
ERROR: Property error : server: image too many values to unpack

Revision history for this message
smarta94 (smarta94) said :

Solved, sort of.

Apparently version 2014.2.1 (Juno) for heat requires a special lenght encryption key (https://bugs.launchpad.net/heat/+bug/1415887). I tried changing my heat password, reset my heat password (and obviosuly the associated config file settings for keystone) using my ldap server for authentication, and then my error changed two different times. Restarting heat services twice then brought me to the included bug.