get_attr used within list_join in SoftwareConfig returns none

Bug #1358831 reported by Tomas Sedovic
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Tomas Sedovic
Icehouse
Fix Released
High
Zane Bitter

Bug Description

Using the template below with:

    `heat stack-create mystack -f overcloud.yaml -P image=fedora-20.x86_64 -P flavor=m1.small`

results in:

    ERROR: Property error : my_config: config "list_join" must operate on a list

This seems to happen because `{get_attr: [servers, name]}` returns None during validation.

The template:

heat_template_version: 2014-10-16

description: "software config using a joined list of ResourceGroup's inner attributes"

parameters:

  key_name:
    default: default
    type: string
  flavor:
    type: string
  image:
    type: string

resources:
  servers:
    type: OS::Heat::ResourceGroup
    properties:
      count: 1
      resource_def:
        type: OS::Nova::Server
        properties:
          flavor: {get_param: flavor}
          image: {get_param: image}
          key_name: {get_param: key_name}

  my_config:
    type: OS::Heat::StructuredConfig
    properties:
      config:
        nodes:
          list_join:
          - ','
          - {get_attr: [servers, name]}

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

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

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

commit 61a9d167c0f36a2846e39fd33a77ce2755801fe6
Author: Tomas Sedovic <email address hidden>
Date: Tue Aug 19 18:35:06 2014 +0200

    Use empty list in list_join for validation

    Calling list_join on the list of ResourceGroup's attributes in a
    SoftwareConfig fails during template validation with:

    ERROR: Property error : my_config: config "list_join" must operate on a
    list

    Closes-Bug: 1358831
    Change-Id: I39d2da7a28ba53fbe3a95bff0198fa5c2f87aa3b

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → juno-3
status: Fix Committed → Fix Released
Steven Hardy (shardy)
tags: added: icehouse-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/121139

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (stable/icehouse)

Change abandoned by Lars Kellogg-Stedman (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/121139
Reason: This appears to have been merged from some other review.

Thierry Carrez (ttx)
Changed in heat:
milestone: juno-3 → 2014.2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/icehouse)

Reviewed: https://review.openstack.org/121139
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=678ea1315e4b2a0f47134679418be7d9f77a32b5
Submitter: Jenkins
Branch: stable/icehouse

commit 678ea1315e4b2a0f47134679418be7d9f77a32b5
Author: Tomas Sedovic <email address hidden>
Date: Tue Aug 19 18:35:06 2014 +0200

    Use empty list in list_join for validation

    Calling list_join on the list of ResourceGroup's attributes in a
    SoftwareConfig fails during template validation with:

    ERROR: Property error : my_config: config "list_join" must operate on a
    list

    Closes-Bug: 1358831
    Change-Id: I39d2da7a28ba53fbe3a95bff0198fa5c2f87aa3b
    (cherry picked from commit 61a9d167c0f36a2846e39fd33a77ce2755801fe6)

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.