Skip to content

Commit

Permalink
Merge pull request #612 from noobaa/eran_037
Browse files Browse the repository at this point in the history
Eran 037
  • Loading branch information
tamireran committed Nov 17, 2015
2 parents f49f850 + 7daf930 commit 4df8570
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 11 additions & 3 deletions src/deploy/NVA_build/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ function disable_supervisord {
${SUPERCTL} shutdown
#kill services
for s in ${services}; do
echo "Kill ${s}"
kill -9 ${s}
done
local mongostatus=$(ps -ef|grep mongod)
echo "Mongo status after disabling supervisord $mongostatus"

}

function enable_supervisord {
deploy_log "enable_supervisord"
local mongostatus_bef=$(ps -ef|grep mongod)
echo "Mongo status before starting supervisord $mongostatus_bef"
${SUPERD}
}

Expand All @@ -32,7 +38,7 @@ function restart_webserver {
mongodown=true
while ${mongodown}; do
if netstat -na|grep LISTEN|grep :27017; then
echo here${mongodown}
echo mongo_${mongodown}
mongodown=false
echo ${mongodown}
else
Expand Down Expand Up @@ -123,7 +129,7 @@ function do_upgrade {
sleep 5;
restart_s3rver
deploy_log "Restarted s3rver"
restart_webserver
restart_webserver
deploy_log "Upgrade finished successfully!"
}

Expand All @@ -133,8 +139,10 @@ deploy_log "upgrade.sh called with $@"
#on a node cluster they are, which meand the listening ports of the webserver are inherited by this create_multipart_upload.
#murder them
fds=`lsof -p $$ | grep LISTEN | awk '{print $4}' | sed 's:\(.*\)u:\1:'`
deploy_log "aaa $fds"
echo "File desscriptors $fds"
for f in ${fds}; do
exec ${f}<&-
eval "exec ${f}<&-"
done

if [ "$1" == "from_file" ]; then
Expand Down
4 changes: 2 additions & 2 deletions src/deploy/NVA_build/upgrade_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ function post_upgrade {

rm -f /tmp/*.tar.gz

/etc/rc.d/init.d/supervisord stop
/etc/rc.d/init.d/supervisord start
#/etc/rc.d/init.d/supervisord stop
#/etc/rc.d/init.d/supervisord start
}


Expand Down

0 comments on commit 4df8570

Please sign in to comment.