Potentially incorrect resolving get_attr function for Resource Group

Bug #1561157 reported by Sergey Kraynev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Peter Razumovsky

Bug Description

The one of common case is creation stack with ResourceGroup resource, where each element is specified as via custom template.

Currently we have strange behavior when try to get some attributes from this resource (when attribute as defined as output of nested stack).

There is example of templates:

main template: http://paste.openstack.org/show/491629/
b.yaml - http://paste.openstack.org/show/491630/
c.yaml - http://paste.openstack.org/show/491631/

There is example of output for stack created with using mentioned templates:
http://paste.openstack.org/show/491587/

It's expected behavior and we just need to update our documentation to
clarify these questions/examples.

description: updated
Changed in heat:
assignee: nobody → Peter Razumovsky (prazumovsky)
Revision history for this message
Peter Razumovsky (prazumovsky) wrote :

Don't see there any problem. In rg_4 you get rg_a_public_ip attrbiute for the first resource if group, type(rg_a_public_ip) == str. In rg_2 you get first element of rg_a_public_ip attrbiute of each resource, so you get list of first characters of each attribute rg_a_public_ip in case of string-type rg_a_public_ip.

Look, I change in main template count of resources if rg_a to 2 and get after that next response: http://paste.openstack.org/show/492214/

IMO, there's no bug.

Revision history for this message
Sergey Kraynev (skraynev) wrote :

As was discussed in related mailing thread [1], it's a new behavior and it's expected result. So we should just update our existing docs with new examples and explanations about how it works.

p.s. bug description will be also updated

[1] http://osdir.com/ml/openstack-dev/2016-03/msg01242.html

description: updated
Revision history for this message
Peter Razumovsky (prazumovsky) wrote :

OK, will do.

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

Changed in heat:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit f18589261ba32394ddde988797adc1a79ed6dba1
Author: Peter Razumovsky <email address hidden>
Date: Fri Apr 1 16:55:29 2016 +0300

    Add information about ResourceGroup attributes

    Add info that ResourceGroup get_attr returns list
    of attributes, if there's no resource_index.

    Change-Id: I184bb142715b29eb770cb88bd60586576ac7bc8f
    Partial-bug: #1561157

Rabi Mishra (rabi)
Changed in heat:
status: In Progress → Fix Released
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.