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
This commit is contained in:
James Slagle 2018-03-28 10:08:39 -04:00
parent 31c2f7a7e4
commit 154879b68d
2 changed files with 6 additions and 1 deletions

View File

@ -157,7 +157,7 @@ for role in $OVERCLOUD_ROLES; do
ssh $SSH_OPTIONS -i $SUBNODES_SSH_KEY $host sudo systemctl enable os-collect-config
fi
((i++))
let i+=1
done

View File

@ -0,0 +1,5 @@
---
fixes:
- When using get-occ-config.sh with a role using 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.