get-occ-config.sh no longer works with roles with a count greater than 1

Bug #1759581 reported by James Slagle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
James Slagle

Bug Description

sample log:
https://pastebin.com/kn6Q8TSJ

notice how the script just exits after ((i++)) even though there were multiple stacks in the $stacks var.

This is because the bash expression ((i++)) evaluates to 0, so returns 1, causing the script to exit.

We need to revert this line back to let i+=1

Changed in tripleo:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → James Slagle (james-slagle)
milestone: none → rocky-1
Revision history for this message
James Slagle (james-slagle) wrote :
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/557346

tags: added: queens-backport-potential
Changed in tripleo:
importance: Critical → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/557346
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=154879b68dfe3ff3834babcfb1d619a4d05044af
Submitter: Zuul
Branch: master

commit 154879b68dfe3ff3834babcfb1d619a4d05044af
Author: James Slagle <email address hidden>
Date: Wed Mar 28 10:08:39 2018 -0400

    get-occ-config.sh: fix handling multiple nodes in a role

    When using get-occ-config.sh with a role with a count greater
    than 1, the script will now configure all nodes that are of that role
    type instead of exiting after only configuring the first.

    Previously, the expression ((i++)) evaluated to 0, and when using
    arithmetic expansion, causes a rc of 1, which caused the script to exit
    after configuring the first node.

    Change-Id: I0a39f2b8f1de5302fd426999acfe5043b0361987
    Closes-Bug: #1759581

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

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/558242

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

Reviewed: https://review.openstack.org/558242
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=d97fc05d399e9021c37bbec171790032a692b5f3
Submitter: Zuul
Branch: stable/queens

commit d97fc05d399e9021c37bbec171790032a692b5f3
Author: James Slagle <email address hidden>
Date: Wed Mar 28 10:08:39 2018 -0400

    get-occ-config.sh: fix handling multiple nodes in a role

    When using get-occ-config.sh with a role with a count greater
    than 1, the script will now configure all nodes that are of that role
    type instead of exiting after only configuring the first.

    Previously, the expression ((i++)) evaluated to 0, and when using
    arithmetic expansion, causes a rc of 1, which caused the script to exit
    after configuring the first node.

    Change-Id: I0a39f2b8f1de5302fd426999acfe5043b0361987
    Closes-Bug: #1759581
    (cherry picked from commit 154879b68dfe3ff3834babcfb1d619a4d05044af)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 9.0.0.0b2

This issue was fixed in the openstack/tripleo-heat-templates 9.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 8.0.2

This issue was fixed in the openstack/tripleo-heat-templates 8.0.2 release.

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

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

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

Change abandoned by Emilien Macchi (<email address hidden>) on branch: stable/pike
Review: https://review.openstack.org/574728
Reason: The gate is having serious troubles with docker.io, we need to abandon this patch so it leaves the gate and when it's stable again I will restore this patch. Please do not restore or do anything, I'll take care of it as soon as things work again.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Emilien Macchi (<email address hidden>) on branch: stable/pike
Review: https://review.openstack.org/574728

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Emilien Macchi (<email address hidden>) on branch: stable/pike
Review: https://review.openstack.org/574728
Reason: we have gate problems again, please do not restore or recheck, I'll take care of this one when gate is back stable.

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

Reviewed: https://review.openstack.org/574728
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=95f19a7e3e52de175926557e09e73f93e8f79d5a
Submitter: Zuul
Branch: stable/pike

commit 95f19a7e3e52de175926557e09e73f93e8f79d5a
Author: James Slagle <email address hidden>
Date: Wed Mar 28 10:08:39 2018 -0400

    get-occ-config.sh: fix handling multiple nodes in a role

    When using get-occ-config.sh with a role with a count greater
    than 1, the script will now configure all nodes that are of that role
    type instead of exiting after only configuring the first.

    Previously, the expression ((i++)) evaluated to 0, and when using
    arithmetic expansion, causes a rc of 1, which caused the script to exit
    after configuring the first node.

    Change-Id: I0a39f2b8f1de5302fd426999acfe5043b0361987
    Closes-Bug: #1759581
    (cherry picked from commit 154879b68dfe3ff3834babcfb1d619a4d05044af)

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

This issue was fixed in the openstack/tripleo-heat-templates 7.0.14 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.