Not quite sure how this happened yet, but if an environment file gets to the engine without resolving the local file:/// references, the stack becomes permanently wedged, you can't even do stack-list anymore.
My environment:
# cat env_minimal.yaml
resource_registry:
# Define a custom resource type based on a template
"My::Custom::Server": file:///tmp/hot_minimal.yaml
Which for some reason was not expanded by heatclient (still looking into why). This means you could also craft an API request with an invalid environment content to have a similar effect.
We get a 400 response, but the stack is left stuck in CREATE, FAILED state
| 95d75439-1113-4ab2-aef8-58466598e2ba | 2013-09-19 17:10:52 | 2013-09-19 17:10:54 | test_stack | 66 | 66 | admin | NULL | FAILED | Resource create failed: Error: Resource create failed: Error: Creation of server test_stack-wordpress_instance-lmnpdgsrn6tk-wordpress_instance-fzbovybrsqjz failed. | {"parameters": {}, "resource_registry": {"My::Custom::Server": "file:///tmp/hot_minimal.yaml", "resources": {}}} | 60 | 2e8a9864067140ecb85f034909d7f10a | 1 | CREATE | NULL |
engine.log
2013-09-19 18:22:30.884 7560 INFO heat.engine.environment [-] Registering My::Custom::Server -> file:///tmp/hot_minimal.yaml
2013-09-19 18:22:30.884 7560 INFO heat.common.urlfetch [-] Fetching data from file:///tmp/hot_minimal.yaml
2013-09-19 18:22:30.884 7560 ERROR heat.openstack.common.rpc.amqp [-] Exception during message handling
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp Traceback (most recent call last):
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp File "/usr/lib/python2.7/site-packages/heat/openstack/common/rpc/amqp.py", line 461, in _process_data
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp **args)
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp File "/usr/lib/python2.7/site-packages/heat/openstack/common/rpc/dispatcher.py", line 172, in dispatch
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp result = getattr(proxyobj, method)(ctxt, **kwargs)
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp File "/usr/lib/python2.7/site-packages/heat/engine/service.py", line 56, in wrapped
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp return func(self, ctx, *args, **kwargs)
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp File "/usr/lib/python2.7/site-packages/heat/engine/service.py", line 146, in identify_stack
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp stack = parser.Stack.load(cnxt, stack=s)
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp File "/usr/lib/python2.7/site-packages/heat/engine/parser.py", line 171, in load
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp parent_resource, owner_id=stack.owner_id)
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp File "/usr/lib/python2.7/site-packages/heat/engine/parser.py", line 108, in __init__
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp for (name, data) in template_resources.items())
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp File "/usr/lib/python2.7/site-packages/heat/engine/parser.py", line 108, in <genexpr>
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp for (name, data) in template_resources.items())
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 133, in __new__
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp return ResourceClass(name, json, stack)
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp File "/usr/lib/python2.7/site-packages/heat/engine/resources/template_resource.py", line 53, in __init__
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp tmpl = template.Template(self.parsed_nested)
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp File "/usr/lib/python2.7/site-packages/heat/engine/resources/template_resource.py", line 97, in parsed_nested
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp self._parsed_nested = template_format.parse(self.template_data)
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp File "/usr/lib/python2.7/site-packages/heat/engine/resources/template_resource.py", line 109, in template_data
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp (self.template_name, str(r_exc)))
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp ValueError: Could not fetch remote template 'file:///tmp/hot_minimal.yaml': Invalid URL scheme file
2013-09-19 18:22:30.884 7560 TRACE heat.openstack.common.rpc.amqp
2013-09-19 18:22:30.885 7560 ERROR heat.openstack.common.rpc.common [-] Returning exception Could not fetch remote template 'file:///tmp/hot_minimal.yaml': Invalid URL scheme file to caller
2013-09-19 18:22:30.885 7560 ERROR heat.openstack.common.rpc.common [-] ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/site-packages/heat/openstack/common/rpc/amqp.py", line 461, in _process_data\n **args)\n', ' File "/usr/lib/python2.7/site-packages/heat/openstack/common/rpc/dispatcher.py", line 172, in dispatch\n result = getattr(proxyobj, method)(ctxt, **kwargs)\n', ' File "/usr/lib/python2.7/site-packages/heat/engine/service.py", line 56, in wrapped\n return func(self, ctx, *args, **kwargs)\n', ' File "/usr/lib/python2.7/site-packages/heat/engine/service.py", line 146, in identify_stack\n stack = parser.Stack.load(cnxt, stack=s)\n', ' File "/usr/lib/python2.7/site-packages/heat/engine/parser.py", line 171, in load\n parent_resource, owner_id=stack.owner_id)\n', ' File "/usr/lib/python2.7/site-packages/heat/engine/parser.py", line 108, in __init__\n for (name, data) in template_resources.items())\n', ' File "/usr/lib/python2.7/site-packages/heat/engine/parser.py", line 108, in <genexpr>\n for (name, data) in template_resources.items())\n', ' File "/usr/lib/python2.7/site-packages/heat/engine/resource.py", line 133, in __new__\n return ResourceClass(name, json, stack)\n', ' File "/usr/lib/python2.7/site-packages/heat/engine/resources/template_resource.py", line 53, in __init__\n tmpl = template.Template(self.parsed_nested)\n', ' File "/usr/lib/python2.7/site-packages/heat/engine/resources/template_resource.py", line 97, in parsed_nested\n self._parsed_nested = template_format.parse(self.template_data)\n', ' File "/usr/lib/python2.7/site-packages/heat/engine/resources/template_resource.py", line 109, in template_data\n (self.template_name, str(r_exc)))\n', "ValueError: Could not fetch remote template 'file:///tmp/hot_minimal.yaml': Invalid URL scheme file\n"]
2013-09-19 18:22:30.885 7560 DEBUG heat.openstack.common.rpc.amqp [-] UNIQUE_ID is fda81d87ad494aca972103ce8e45e1a5. _add_unique_id /usr/lib/python2.7/site-packages/heat/openstack/common/rpc/amqp.py:341
Fix proposed to branch: master /review. openstack. org/47484
Review: https:/