diff options
author | carey.xu <carey.xuhan@huawei.com> | 2016-02-01 11:50:38 +0800 |
---|---|---|
committer | shuai chen <chenshuai@huawei.com> | 2016-02-01 08:36:27 +0000 |
commit | 13620d3f02a0aa1f225ecc81fc12b06796e52d19 (patch) | |
tree | ed06997d13d3d19543395412cbaedb5dd9e2033d /deploy | |
parent | 81752c48ce4674e9084de3303bfb6f088365b30b (diff) |
[jenkins]process leaked
JIRA: COMPASS-297
Change-Id: I82dbc1d4f14667c90eeb2a759821d7e4271f9dc0
Signed-off-by: carey.xu <carey.xuhan@huawei.com>
(cherry picked from commit a863046c1ba5e12825ba17ed47d333cdc988aaad)
Diffstat (limited to 'deploy')
-rwxr-xr-x | deploy/deploy_host.sh | 7 |
1 files changed, 5 insertions, 2 deletions
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 } |