roles_data.yaml ignores a default count of zero

Bug #1625760 reported by Steven Hardy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Steven Hardy

Bug Description

There's a bug in the j2 syntax which means we ignore a default count of zero:

  BlockStorageCount:
    description: Number of BlockStorage nodes to deploy
    type: number

This should have default: 0 because of

- name: BlockStorage
  CountDefault: 0

but the j2 conditional doesn't evaluate true when CountDefault is zero:

  {% if role.CountDefault %}
    default: {{role.CountDefault}}
  {% endif %}

Steven Hardy (shardy)
Changed in tripleo:
milestone: none → newton-rc2
status: New → Triaged
importance: Undecided → Medium
importance: Medium → High
assignee: nobody → Steven Hardy (shardy)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

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

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

Reviewed: https://review.openstack.org/373994
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=1e723337029b8ea77f12dd2d75a4a426570f1c63
Submitter: Jenkins
Branch: master

commit 1e723337029b8ea77f12dd2d75a4a426570f1c63
Author: Steven Hardy <email address hidden>
Date: Wed Sep 21 11:10:47 2016 +0100

    Make defaults from roles_data.yaml more robust

    The previous logic left out the default Count completely when it was
    zero, which breaks nested validation and it's likely similar problems
    would exist with the other optional defaults, so rework it so the
    defaulting happens in the jinja2 logic, and document the interfaces
    better in roles_data.yaml

    Change-Id: I7f2eb4a3a0b43c5d2cd0d001ed3c73f783c95c74
    Closes-Bug: #1625760

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 5.0.0.0rc2

This issue was fixed in the openstack/tripleo-heat-templates 5.0.0.0rc2 release candidate.

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.