Skip to content

Commit 3284983

Browse files
committed
Adds interval to ssh exec with retry
1 parent 2eb8685 commit 3284983

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

configure-rdo.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ run_ssh_cmd () {
6565
run_ssh_cmd_with_retry () {
6666
SSHUSER_HOST=$1
6767
CMD=$2
68+
INTERVAL=$3
6869
MAX_RETRIES=10
6970

7071
COUNTER=0
@@ -75,6 +76,10 @@ run_ssh_cmd_with_retry () {
7576
return 0
7677
fi
7778
let COUNTER=COUNTER+1
79+
80+
if [ -n "$INTERVAL" ]; then
81+
sleep $INTERVAL
82+
fi
7883
done
7984
return $EXIT
8085
}
@@ -236,9 +241,9 @@ echo "Validating configuration"
236241

237242
wait_for_listening_port $CONTROLLER_VM_IP 22 $MAX_WAIT_SECONDS
238243

239-
run_ssh_cmd_with_retry $RDO_ADMIN@$CONTROLLER_VM_IP "source ./keystonerc_admin && nova service-list | sed -e '$d' | awk '(NR > 3) {print $10}' | sed -rn '/down/q1'"
244+
run_ssh_cmd_with_retry $RDO_ADMIN@$CONTROLLER_VM_IP "source ./keystonerc_admin && nova service-list | sed -e '$d' | awk '(NR > 3) {print $10}' | sed -rn '/down/q1'" 10
240245

241-
run_ssh_cmd_with_retry $RDO_ADMIN@$CONTROLLER_VM_IP "source ./keystonerc_admin && quantum agent-list -f csv | sed -e '1d' | sed -rn 's/\".*\",\".*\",\".*\",\"(.*)\",.*/\1/p' | sed -rn '/xxx/q1'"
246+
run_ssh_cmd_with_retry $RDO_ADMIN@$CONTROLLER_VM_IP "source ./keystonerc_admin && quantum agent-list -f csv | sed -e '1d' | sed -rn 's/\".*\",\".*\",\".*\",\"(.*)\",.*/\1/p' | sed -rn '/xxx/q1'" 10
242247

243248
echo "RDO installed!!"
244249

0 commit comments

Comments
 (0)