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 http://172.16.128.11:8004/v1/8df11859bd554dc4bc3d6b7f824cf5d6/stacks -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): 172.16.128.11
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>
sys.exit(main())
File "/usr/lib/python2.7/site-packages/heatclient/shell.py", line 656, in main
HeatShell().main(args)
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
hc.stacks.create(**fields)
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.
parameters:
ImageID:
type: string
description: Image to use for the Server
NetID:
type: string
description: Network ID for the server
flavor:
type: string
description: Flavor to use for the new server VM
resources:
my_server:
type: OS::Nova::Server
properties:
name: "SimpleTestServer"
flavor: {get_param: flavor }
image: {get_param: ImageID }
networks:
- network: { get_param: NetID }
outputs:
private_ip:
description: IP address of the server in the private network
value: { get_attr: [ server, first_address ] }