Skip to content

Commit

Permalink
Merge pull request #154 from scality/bugfix/PTFE-1834-fixup-unexpecte…
Browse files Browse the repository at this point in the history
…d-operator

PTFE-1834 fix lifecycle prestop failures
  • Loading branch information
tcarmet authored Jun 27, 2024
2 parents 337bbed + 98fb692 commit 0dfde7f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ echo "Stopping nginx..."
sleep 5

# retrieve nginx status and check if there's any active connection
ACTIVE_CONNECTION=""
ACTIVE_CONNECTION="0"

while [ ${ACTIVE_CONNECTION} != "1" ]; do
ACTIVE_CONNECTION=$(curl -s http://localhost/nginx_status | grep 'Active connections' | awk '{print $3}')
Expand All @@ -17,8 +17,3 @@ done

PID=$(cat /run/nginx.pid)
nginx -s quit

echo "Waiting for nginx PID: ${PID} to stop..."
while [ -d /proc/$PID ]; do
sleep 0.1
done

0 comments on commit 0dfde7f

Please sign in to comment.