get_att non-obvious failure on 2013-05-23 HOT

Bug #1404360 reported by Steven Hardy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Thomas Spatzier

Bug Description

If you accidentally get your template version wrong, e.g:

  heat_template_version: 2013-05-23

  resources:
    random_group:
      type: OS::Heat::ResourceGroup
      properties:
        count: 2
        resource_def:
          type: OS::Heat::RandomString

  outputs:
    all_values:
      value: {get_attr: [random_group, attributes, value]}

You get:

  "output_error": "The Referenced Attribute (random_group attributes) is incorrect.",

This is quite confusing, since the referenced attribute exists for the resource, the error is we're passing path components to a version of get_att which doesn't support it AFAICT.

I imagine path based lookup of nested stacks will fail in a similar way, quite puzzling until you spot the problem, so a better error and maybe note in the attribute documentation should be added.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/143156

Changed in heat:
assignee: nobody → Steven Hardy (shardy)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/143156
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=0d746a9dde3cfcccfb3fe84a9671d3b6cca595b1
Submitter: Jenkins
Branch: master

commit 0d746a9dde3cfcccfb3fe84a9671d3b6cca595b1
Author: Steven Hardy <email address hidden>
Date: Fri Dec 19 19:05:34 2014 +0000

    Clarify "attributes" support status for ResourceGroup

    This was added during juno but not documented as such. Also clarify
    that latest HOT is required, or the path based get_attr call won't
    work (currently in a really non-obvious way..)

    Change-Id: I14f600cfc9f0f56b2acf366ef7fcbef25d16f003
    Partial-Bug: #1404360

Angus Salkeld (asalkeld)
Changed in heat:
importance: Undecided → High
milestone: none → kilo-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/146836

Changed in heat:
assignee: Steven Hardy (shardy) → Thomas Spatzier (thomas-spatzier)
Revision history for this message
Thomas Spatzier (thomas-spatzier) wrote :

Is anyone aware of another place that we need to fix? Or can we close this?

Steven fixed the immediate issue in ResourceGroup and I fixed a related documentation issue.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/146836
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=c340a2b79bed32e5533c5c55e969250c6c90e8e0
Submitter: Jenkins
Branch: master

commit c340a2b79bed32e5533c5c55e969250c6c90e8e0
Author: Thomas Spatzier <email address hidden>
Date: Tue Jan 13 13:05:47 2015 +0100

    Fix template version in composition section

    The composition section uses some example templates that only work
    correctly with the latest heat_template_version 2014-10-16 as has
    been pointed out in a comment on review
    https://review.openstack.org/#/c/146454

    This change simply pulls all changes from the review mentioned
    above to the composition section in the heat repository.

    Change-Id: I2fcc64f80e1f5a1109ba31edec92912e8e55830d
    Partial-Bug: #1404360

Revision history for this message
Thomas Spatzier (thomas-spatzier) wrote :

Talked to Steven on IRC and we think this bug is addressed now and can be closed.

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.