From 154879b68dfe3ff3834babcfb1d619a4d05044af Mon Sep 17 00:00:00 2001 From: James Slagle Date: Wed, 28 Mar 2018 10:08:39 -0400 Subject: [PATCH] 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 --- deployed-server/scripts/get-occ-config.sh | 2 +- ...cc-config-with-role-count-greater-1-10ce2010556e5b76.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/fix-get-occ-config-with-role-count-greater-1-10ce2010556e5b76.yaml diff --git a/deployed-server/scripts/get-occ-config.sh b/deployed-server/scripts/get-occ-config.sh index a405f4493f..c00c26efc0 100755 --- a/deployed-server/scripts/get-occ-config.sh +++ b/deployed-server/scripts/get-occ-config.sh @@ -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 diff --git a/releasenotes/notes/fix-get-occ-config-with-role-count-greater-1-10ce2010556e5b76.yaml b/releasenotes/notes/fix-get-occ-config-with-role-count-greater-1-10ce2010556e5b76.yaml new file mode 100644 index 0000000000..4bb8e6015c --- /dev/null +++ b/releasenotes/notes/fix-get-occ-config-with-role-count-greater-1-10ce2010556e5b76.yaml @@ -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.