Description of problem: The output from 'heat stack-create' when glance has more than one image with the same name is not at all useful. Version-Release number of selected component (if applicable): openstack-heat-api-cfn-6.0.1-0.20160506080957.1fd4fd4.el7.centos.noarch python-heatclient-1.1.1-0.20160504143937.c264087.el7.centos.noarch openstack-heat-common-6.0.1-0.20160506080957.1fd4fd4.el7.centos.noarch openstack-heat-api-6.0.1-0.20160506080957.1fd4fd4.el7.centos.noarch openstack-heat-api-cloudwatch-6.0.1-0.20160506080957.1fd4fd4.el7.centos.noarch openstack-heat-engine-6.0.1-0.20160506080957.1fd4fd4.el7.centos.noarch openstack-heat-templates-0.0.1-0.20160427191447.1efb0c0.el7.centos.noarch openstack-tripleo-heat-templates-2.0.1-0.20160506150529.207a21c.el7.centos.noarch How reproducible: 100% Steps to Reproduce: 1. Create a template with a OS::Nova::Server and a parameter for specifying the image 2. Create two glance images with the same name 3. Call the template with the non-unique image name Actual results: ERROR: Failed to validate: Failed to validate: resources[0]: %(error)s%(path)s%(message)s Expected results: "The image name is not unique dumbass" Additional info: The server logs contained: 2016-06-03 02:15:24.584 25889 ERROR heat.engine.stack [req-1db91f45-5a0d-4bcd-b4c1-1671e2626cd9 - admin - default default] Exception: 2016-06-03 02:15:24.584 25889 ERROR heat.engine.stack Traceback (most recent call last): 2016-06-03 02:15:24.584 25889 ERROR heat.engine.stack File "/usr/lib/python2.7/site-packages/heat/engine/stack.py", line 753, in validate 2016-06-03 02:15:24.584 25889 ERROR heat.engine.stack result = res.validate() 2016-06-03 02:15:24.584 25889 ERROR heat.engine.stack File "/usr/lib/python2.7/site-packages/heat/engine/resources/openstack/nova/server.py", line 1374, in validate 2016-06-03 02:15:24.584 25889 ERROR heat.engine.stack self._validate_image_flavor(image, flavor) 2016-06-03 02:15:24.584 25889 ERROR heat.engine.stack File "/usr/lib/python2.7/site-packages/heat/engine/resources/openstack/nova/server.py", line 1319, in _validate_image_flavor 2016-06-03 02:15:24.584 25889 ERROR heat.engine.stack image_obj = self.client_plugin('glance').get_image(image) 2016-06-03 02:15:24.584 25889 ERROR heat.engine.stack File "/usr/lib/python2.7/site-packages/heat/engine/clients/os/glance.py", line 105, in get_image 2016-06-03 02:15:24.584 25889 ERROR heat.engine.stack return self._find_with_attr('images', name=image_identifier) 2016-06-03 02:15:24.584 25889 ERROR heat.engine.stack File "/usr/lib/python2.7/site-packages/heat/engine/clients/os/glance.py", line 62, in _find_with_attr 2016-06-03 02:15:24.584 25889 ERROR heat.engine.stack raise exceptions.NoUniqueMatch() 2016-06-03 02:15:24.584 25889 ERROR heat.engine.stack NoUniqueMatch
Merged upstream in Newton.
snip: cat test.yaml parameters: image_name: type: string default: heat_cirros resources: glance_image1: type: Test::GlanceImage properties: image_name: {get_param: image_name} glance_image2: type: Test::GlanceImage properties: image_name: {get_param: image_name} | stack_status | CREATE_FAILED | stack_status_reason | Resource CREATE failed: resources.server1: Property | | error: resources.server.properties.image: Error | | validating value 'heat_cirros': No images unique match | | found for {'name': u'heat_cirros'}.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHEA-2016-2948.html