Not all attributes stored for Heat AutoScalingGroup

Bug #1737047 reported by Zane Bitter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Zane Bitter

Bug Description

When referencing attributes of HeatAutoScalingGroups in the form ["resources.<index>.<attr name>", ...] or ["resources.<index>", "attr_name", ...], we should generate outputs in the nested template that reference the resource. However, the code which is supposed to generate these outputs treats the <index> as a resource name, which it is not in an AutoScalingGroup (it is for ResourceGroup), with the result that no outputs are generated.

This would cause the nested stack to not think these attributes are referenced, and therefore not store them.

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/530975

Rico Lin (rico-lin)
Changed in heat:
milestone: queens-3 → queens-rc1
milestone: queens-rc1 → queens-3
Rico Lin (rico-lin)
Changed in heat:
milestone: queens-3 → queens-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/530975
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=4a3a1ad15bdcfd67e0548481c70545e41a9476d9
Submitter: Zuul
Branch: master

commit 4a3a1ad15bdcfd67e0548481c70545e41a9476d9
Author: Zane Bitter <email address hidden>
Date: Mon Jan 8 17:23:12 2018 -0500

    Fix attribute caching in Heat AutoScalingGroup

    Attributes for an individual resource in an OS::Heat::AutoScalingGroup can
    be retrieved using the attribute name 'resource.<index>'. Because we were
    treating the index as a resource name when generating the template, we
    would never generate an output in the nested template that referenced the
    resource's attribute, so it wouldn't get cached. Since we can't know the
    indices ahead of time, the only way to cache these is to do it for all
    resources in the group - which is the same data cached by the equivalent
    'outputs' attribute.

    We also need to take into account both possible forms of syntax:

        [<asg_name>, resource.<index>.<attr_name>, ...]

    or:

        [<asg_name>, resource.<index>, <attr_name>, ...]

    Change-Id: I1d2898cdd4759b1bb9de1896a40056685e728f44
    Closes-Bug: #1737047
    Partial-Bug: #1731349
    Related-Bug: #1660831

Changed in heat:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/539661

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 10.0.0.0rc1

This issue was fixed in the openstack/heat 10.0.0.0rc1 release candidate.

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

Reviewed: https://review.openstack.org/539661
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=07382d99d1b4dcf5697c88e43b8f81f647965d3c
Submitter: Zuul
Branch: stable/pike

commit 07382d99d1b4dcf5697c88e43b8f81f647965d3c
Author: Zane Bitter <email address hidden>
Date: Mon Jan 8 17:23:12 2018 -0500

    Fix attribute caching in Heat AutoScalingGroup

    Attributes for an individual resource in an OS::Heat::AutoScalingGroup can
    be retrieved using the attribute name 'resource.<index>'. Because we were
    treating the index as a resource name when generating the template, we
    would never generate an output in the nested template that referenced the
    resource's attribute, so it wouldn't get cached. Since we can't know the
    indices ahead of time, the only way to cache these is to do it for all
    resources in the group - which is the same data cached by the equivalent
    'outputs' attribute.

    We also need to take into account both possible forms of syntax:

        [<asg_name>, resource.<index>.<attr_name>, ...]

    or:

        [<asg_name>, resource.<index>, <attr_name>, ...]

    Change-Id: I1d2898cdd4759b1bb9de1896a40056685e728f44
    Closes-Bug: #1737047
    Partial-Bug: #1731349
    Related-Bug: #1660831
    (cherry picked from commit 4a3a1ad15bdcfd67e0548481c70545e41a9476d9)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 9.0.4

This issue was fixed in the openstack/heat 9.0.4 release.

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.