Ask Your Question

Heat error on Juno "Template version was not provided"

asked 2014-11-27 10:43:37 -0500

sophdev06 gravatar image

updated 2014-11-27 20:46:13 -0500

SamYaple gravatar image

Hello, actually I have a problem with heat:(no problem in Icehouse, problem with juno upgrade) when I create or validate a stack with the heat I have an error:

ERROR: The template version is invalid: Template version was not provided

With the client debug mode I have:

root@s-bigstack-control:~#  heat -d  template-validate --template-file ./test-stack.yml
DEBUG (v2) Making authentication request to http://s-bigstack-control:35357/v2.0/tokens
DEBUG (http) curl -i -X POST -H 'X-Auth-Token: 0ddf80b6201d4f80bc75f9341e8122d4' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'User-Agent: python-heatclient' -d '{"files": {}, "environment": {}, "template": {"outputs": {"server1_private_ip": {"description": "IP address of the server in the private network", "value": {"get_attr": ["server1", "first_address"]}}}, "heat_template_version": "2013-05-23", "description": "Test Template test CB 24-11-2014 Juno upgrade post-install.\n", "parameters": {"ImageID": {"type": "string", "description": "Image use to boot a server"}, "NetID": {"type": "string", "description": "Network ID for the server"}}, "resources": {"server1": {"type": "OS::Nova::Server", "properties": {"image": {"get_param": "ImageID"}, "name": "Test server", "flavor": "m1.tiny", "networks": [{"network": {"get_param": "NetID"}}]}}}}}' http://s-bigstack-control:8004/v1/240dfa5816bc4054847d458a5c144098/validate
DEBUG (http)
HTTP/1.1 400 Bad Request
date: Thu, 27 Nov 2014 16:25:39 GMT
content-length: 1177
content-type: application/json; charset=UTF-8
x-openstack-request-id: req-c0ffde47-ccd9-4c08-b1c6-ff82909a81ad

{"explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400, "error": {"message": "The template version is invalid: Template version was not provided", "traceback": "Traceback (most recent call last):\n\n  File \"/usr/lib/python2.7/dist-packages/heat/engine/\", line 69, in wrapped\n    return func(self, ctx, *args, **kwargs)\n\n  File \"/usr/lib/python2.7/dist-packages/heat/engine/\", line 765, in validate_template\n    tmpl = templatem.Template(template)\n\n  File \"/usr/lib/python2.7/dist-packages/heat/engine/\", line 95, in __new__\n    TemplateClass = get_template_class(template)\n\n  File \"/usr/lib/python2.7/dist-packages/heat/engine/\", line 67, in get_template_class\n    version = get_version(template_data, available_versions)\n\n  File \"/usr/lib/python2.7/dist-packages/heat/engine/\", line 47, in get_version\n    raise exception.InvalidTemplateVersion(explanation=explanation)\n\nInvalidTemplateVersion: The template version is invalid: Template version was not provided\n", "type": "InvalidTemplateVersion"}, "title": "Bad Request"}

Traceback (most recent call last):
  File "/usr/bin/heat", line 10, in <module>
  File "/usr/lib/python2.7/dist-packages/heatclient/", line 443, in main
  File "/usr/lib/python2.7/dist-packages/heatclient/", line 399, in main
    args.func(client, args)
  File "/usr/lib/python2.7/dist-packages/heatclient/v1/", line 558, in do_template_validate
    validation = hc.stacks.validate(**fields)
  File "/usr/lib/python2.7/dist-packages/heatclient/v1/", line 160, in validate
    resp, body = self.client.json_request('POST', '/validate', data=kwargs)
  File "/usr/lib/python2.7/dist-packages/heatclient/common/", line 233, in json_request
    resp = self._http_request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/heatclient/common/", line 194, in _http_request
    raise exc.from_response(resp)
heatclient.exc.HTTPBadRequest: ERROR: The template version is invalid: Template version was not provided

in the heat-engine ...

edit retag flag offensive close merge delete


I thik this is not problem with the template but openstack configuration, I tested your template in my environment and had no problem. I think this can be some connectivity/access problem (see keystone, nova, neutron logs).

ZJ gravatar imageZJ ( 2014-11-28 01:36:24 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2014-11-28 20:55:32 -0500

Qiming gravatar image

from the log, it seems you are missing one python package 'iso8601'

edit flag offensive delete link more

answered 2014-11-27 20:50:01 -0500

SamYaple gravatar image

Based on the error I would guess this is a template problem. I am not familiar with the changes to Heat from Icehouse to Juno but I would recommend not using single quotes in the version. heat_template_version: 2013-05-23

The developer template does not use single quotes. Try changing that and post back.

edit flag offensive delete link more


Hello Sam, and thank's a lot, I have made tests with and without single quotes for the value of heat_template_version but I have the same error.

sophdev06 gravatar imagesophdev06 ( 2014-11-27 21:38:47 -0500 )edit

Ok. I would follow ZJs lead since he said he tested this in his environment (i did not test it). Youll want to post your Heat config. Maybe we'll see something.

SamYaple gravatar imageSamYaple ( 2014-11-28 15:06:26 -0500 )edit

Hello, it seems I had a python lib problem/conflict on my server (from saharaUI/sahara installed in icehouse version whith pip?) . I have done: - purge heat packets with apt - purge rabbitmq with apt - RabbitMQ install (apt) - Heat install (apt) - heat conf. => heat run like a charm..thank's

sophdev06 gravatar imagesophdev06 ( 2014-12-03 02:43:13 -0500 )edit

I am facing same issue, can you please clearly explain what you have done to get rid of this issue. I am sorry I could not understand the steps you have done to get it working. Thank you in advance.

Bharath gravatar imageBharath ( 2015-01-16 01:15:51 -0500 )edit

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


Asked: 2014-11-27 10:43:37 -0500

Seen: 1,441 times

Last updated: Nov 28 '14