21:31:13 Server upgrade from '80025' to '80027' started.
21:37:55 Server upgrade from '80025' to '80027' completed.
Notice the upgrade took >5 min to complete.
We have a number of bugs similar to this, like LP: #1901830, #1928493, #1929314, and maybe #1929430.
The postinst has this code:
stop_server(){
local tmpdir=$1
# Send kill signal
server_pid=$(cat "$tmpdir/mysqld.pid")
kill "$server_pid"
for i in $(seq 1 60); do
sleep 0.1 # A full second is too long, but we need to give the server _some_ time.
if ! $(ps $server_pid >/dev/null 2>&1); then
return 0
fi
sleep 1
done
# The server hasn't shut down in a timely manner
echo "Error: Unable to shut down server with process id $server_pid" >&2
return 1
}
If I read this right it suggests that it waits only 1 minute for the old server to shut down before considering it failed. Increasing the timeout to 10 minutes would seem excessive but from the logs it appears that would work around the problem...
Of course, if we expect a shutdown within a minute but it takes 7-10 minutes in practice sometimes, then that suggests examining why it sometimes takes so long.
21:31:13 Server upgrade from '80025' to '80027' started.
21:37:55 Server upgrade from '80025' to '80027' completed.
Notice the upgrade took >5 min to complete.
We have a number of bugs similar to this, like LP: #1901830, #1928493, #1929314, and maybe #1929430.
The postinst has this code:
stop_server(){ mysqld. pid")
local tmpdir=$1
# Send kill signal
server_pid=$(cat "$tmpdir/
kill "$server_pid"
for i in $(seq 1 60); do
sleep 0.1 # A full second is too long, but we need to give the server _some_ time.
if ! $(ps $server_pid >/dev/null 2>&1); then
return 0
fi
sleep 1
done
# The server hasn't shut down in a timely manner
echo "Error: Unable to shut down server with process id $server_pid" >&2
return 1
}
If I read this right it suggests that it waits only 1 minute for the old server to shut down before considering it failed. Increasing the timeout to 10 minutes would seem excessive but from the logs it appears that would work around the problem...
Of course, if we expect a shutdown within a minute but it takes 7-10 minutes in practice sometimes, then that suggests examining why it sometimes takes so long.