Invalid condition "<%boot%>" raised when parse 'repeat' args

Bug #1675368 reported by huangtianhua
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
In Progress
High
huangtianhua

Bug Description

Create a stack with following template:

  parameters:
    boot_flag:
      type: comma_delimited_list
      default: [true, false]
  resources:
    my_ser:
    type: OS::Nova::Server
    properties:
      name: my_server
      flavor: 1
      block_device_mapping:
        repeat:
          template:
            device_name: {if: [<%boot%>, 'vda', 'vdb']}
            volume_id: {if: [<%boot%>, {get_resource: boot_vol}, {get_resource: data_vol}]}
          for_each:
            <%boot%>: {get_param: boot_flag}

expected: stack create success
actually: an error raised: resources.my_ser.properties.block_device_mapping.repeat.template.device_name.if: : Invalid condition "<%boot%>"

The reason is that 'repeat' function can not be parsed, because the we parse its args first, when we parse 'if', <%boot%> has not been replaced.

Changed in heat:
assignee: nobody → huangtianhua (huangtianhua)
importance: Undecided → High
milestone: none → pike-1
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/449098

Changed in heat:
status: New → In Progress
Rico Lin (rico-lin)
Changed in heat:
milestone: pike-1 → pike-2
Rico Lin (rico-lin)
Changed in heat:
milestone: pike-2 → pike-3
Rico Lin (rico-lin)
Changed in heat:
milestone: pike-3 → pike-rc1
Rabi Mishra (rabi)
Changed in heat:
milestone: pike-rc1 → pike-rc2
Rabi Mishra (rabi)
Changed in heat:
milestone: pike-rc2 → queens-1
Rico Lin (rico-lin)
Changed in heat:
milestone: queens-1 → pike-rc2
Rico Lin (rico-lin)
Changed in heat:
milestone: pike-rc2 → queens-1
Rico Lin (rico-lin)
Changed in heat:
milestone: queens-1 → queens-2
Rico Lin (rico-lin)
Changed in heat:
milestone: queens-2 → queens-3
Zane Bitter (zaneb)
Changed in heat:
milestone: queens-3 → next
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (master)

Change abandoned by Zane Bitter (<email address hidden>) on branch: master
Review: https://review.opendev.org/449098

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.