From: David Galloway Date: Tue, 27 Feb 2018 00:08:39 +0000 (-0500) Subject: sepia-fog-images: Remove finished hostnames properly X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0ef34c6112bfc75a6c6ffe1deb1cb3c62f650ae8;p=ceph-build.git sepia-fog-images: Remove finished hostnames properly Before this change, if there were 3+ hosts in $remaininghosts and one of the hostnames in the middle finished, sed would remove the hostname and its trailing space which would mash the last two hostnames together. ``` Example: remaininghosts="mira071 smithi164 mira001" remaininghosts=$(echo $remaininghosts | sed -e "s/ *smithi164 *//") $ echo $remaininghosts mira071mira001 ``` Signed-off-by: David Galloway --- diff --git a/sepia-fog-images/build/build b/sepia-fog-images/build/build index 61037e36..39e86560 100755 --- a/sepia-fog-images/build/build +++ b/sepia-fog-images/build/build @@ -136,7 +136,7 @@ while [ "$remaininghosts" != "" ]; do ssh ubuntu@store01.front.sepia.ceph.com "sudo /usr/local/sbin/set-next-server.sh $host fog" # Prep the host for FOG image capture ansible-playbook $WORKSPACE/ceph-cm-ansible/tools/prep-fog-capture.yml -e ansible_ssh_user=ubuntu --limit="$host*" - remaininghosts=$(echo $remaininghosts | sed -e "s/ *$host *//") + remaininghosts=${remaininghosts//$host/} else # This gets noisy set +ex