aboutsummaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
authorcarey.xu <carey.xuhan@huawei.com>2016-02-01 11:50:38 +0800
committercarey.xu <carey.xuhan@huawei.com>2016-02-01 11:50:38 +0800
commita863046c1ba5e12825ba17ed47d333cdc988aaad (patch)
tree64aad95a3e0bea580391f0e178841117f6652b33 /deploy
parentc86a18531a6187c0ca67fc2b8dc4ae7216cef23c (diff)
[jenkins]process leaked
JIRA: COMPASS-297 Change-Id: I82dbc1d4f14667c90eeb2a759821d7e4271f9dc0 Signed-off-by: carey.xu <carey.xuhan@huawei.com>
Diffstat (limited to 'deploy')
-rwxr-xr-xdeploy/deploy_host.sh7
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
}