Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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