From a863046c1ba5e12825ba17ed47d333cdc988aaad Mon Sep 17 00:00:00 2001 From: "carey.xu" Date: Mon, 1 Feb 2016 11:50:38 +0800 Subject: [jenkins]process leaked JIRA: COMPASS-297 Change-Id: I82dbc1d4f14667c90eeb2a759821d7e4271f9dc0 Signed-off-by: carey.xu --- deploy/deploy_host.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'deploy') diff --git a/deploy/deploy_host.sh b/deploy/deploy_host.sh index 9617b241..1753866f 100755 --- a/deploy/deploy_host.sh +++ b/deploy/deploy_host.sh @@ -14,12 +14,12 @@ function rename_nics(){ } function deploy_host(){ - + AYNC_TIMEOUT = 20 ssh $ssh_args root@${MGMT_IP} mkdir -p /opt/compass/bin/ansible_callbacks scp $ssh_args -r ${COMPASS_DIR}/deploy/status_callback.py root@${MGMT_IP}:/opt/compass/bin/ansible_callbacks/status_callback.py # avoid nodes reboot to fast, cobbler can not give response - (sleep 20; rename_nics; reboot_hosts) & + (sleep $AYNC_TIMEOUT; rename_nics; reboot_hosts) & if [[ "$REDEPLOY_HOST" == true ]]; then deploy_flag="redeploy" else @@ -47,4 +47,7 @@ function deploy_host(){ --enable_secgroup="${ENABLE_SECGROUP}" --enable_fwaas="${ENABLE_FWAAS}" \ --rsa_file="$rsa_file" --enable_vpnaas="${ENABLE_VPNAAS}" + RET=$? + sleep $((AYNC_TIMEOUT+5)) + exit $RET } -- cgit 1.2.3-korg