Skip to content

Commit 4df8570

Browse files
committed
Merge pull request #612 from noobaa/eran_037
Eran 037
2 parents f49f850 + 7daf930 commit 4df8570

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/deploy/NVA_build/upgrade.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@ function disable_supervisord {
1818
${SUPERCTL} shutdown
1919
#kill services
2020
for s in ${services}; do
21+
echo "Kill ${s}"
2122
kill -9 ${s}
2223
done
24+
local mongostatus=$(ps -ef|grep mongod)
25+
echo "Mongo status after disabling supervisord $mongostatus"
26+
2327
}
2428

2529
function enable_supervisord {
2630
deploy_log "enable_supervisord"
31+
local mongostatus_bef=$(ps -ef|grep mongod)
32+
echo "Mongo status before starting supervisord $mongostatus_bef"
2733
${SUPERD}
2834
}
2935

@@ -32,7 +38,7 @@ function restart_webserver {
3238
mongodown=true
3339
while ${mongodown}; do
3440
if netstat -na|grep LISTEN|grep :27017; then
35-
echo here${mongodown}
41+
echo mongo_${mongodown}
3642
mongodown=false
3743
echo ${mongodown}
3844
else
@@ -123,7 +129,7 @@ function do_upgrade {
123129
sleep 5;
124130
restart_s3rver
125131
deploy_log "Restarted s3rver"
126-
restart_webserver
132+
restart_webserver
127133
deploy_log "Upgrade finished successfully!"
128134
}
129135

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

140148
if [ "$1" == "from_file" ]; then

src/deploy/NVA_build/upgrade_wrapper.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ function post_upgrade {
209209

210210
rm -f /tmp/*.tar.gz
211211

212-
/etc/rc.d/init.d/supervisord stop
213-
/etc/rc.d/init.d/supervisord start
212+
#/etc/rc.d/init.d/supervisord stop
213+
#/etc/rc.d/init.d/supervisord start
214214
}
215215

216216

0 commit comments

Comments
 (0)