Bug 1342861 - Overly vague error message
Summary: Overly vague error message
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat
Version: 9.0 (Mitaka)
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: 10.0 (Newton)
Assignee: Rabi Mishra
QA Contact: Amit Ugol
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-06 02:06 UTC by Andrew Beekhof
Modified: 2016-12-14 15:35 UTC (History)
9 users (show)

Fixed In Version: openstack-heat-7.0.0-1.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-14 15:35:58 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:2948 normal SHIPPED_LIVE Red Hat OpenStack Platform 10 enhancement update 2016-12-14 19:55:27 UTC
OpenStack gerrit 331450 None None None 2016-07-14 13:16:41 UTC
Launchpad 1590727 None None None 2016-06-09 12:41:12 UTC

Description Andrew Beekhof 2016-06-06 02:06:25 UTC
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

Comment 2 Zane Bitter 2016-07-14 13:17:30 UTC
Merged upstream in Newton.

Comment 5 Amit Ugol 2016-11-02 06:33:02 UTC
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'}.

Comment 7 errata-xmlrpc 2016-12-14 15:35:58 UTC
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


Note You need to log in before you can comment on or make changes to this bug.