Already dead process tolerance in unstack.sh
The gate/updown.sh calls the unstack.sh with -ex option. Normally we do not use -e with unstack.sh. The unstack.sh can fail if the service already stopped, and it also can have flaky failures on the gate. For example the stop_swift function tries to kill swift in two different ways, and if the first one succeeds before the 2th attempt the pkill fails the whole unstack.sh. This change accepts kill failure. Normally the kill can fail if the process does not exits, or when you do not have permission to the kill operation. Since the permission issue is very unlikely in our case, this change does not tries to distinguish the two operation. The behavior of the unstack.sh wen you are not using -ex should not be changed by this change. Change-Id: I64bf3cbe1b60c96f5b271dcfb620c3d4b50de26b
This commit is contained in:
parent
85a1c488df
commit
f750a6fedb
@ -1342,7 +1342,7 @@ function screen_stop_service {
|
|||||||
|
|
||||||
if is_service_enabled $service; then
|
if is_service_enabled $service; then
|
||||||
# Clean up the screen window
|
# Clean up the screen window
|
||||||
screen -S $SCREEN_NAME -p $service -X kill
|
screen -S $SCREEN_NAME -p $service -X kill || true
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ function neutron_agent_lbaas_configure_agent {
|
|||||||
|
|
||||||
function neutron_lbaas_stop {
|
function neutron_lbaas_stop {
|
||||||
pids=$(ps aux | awk '/haproxy/ { print $2 }')
|
pids=$(ps aux | awk '/haproxy/ { print $2 }')
|
||||||
[ ! -z "$pids" ] && sudo kill $pids
|
[ ! -z "$pids" ] && sudo kill $pids || true
|
||||||
}
|
}
|
||||||
|
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
|
Loading…
Reference in New Issue
Block a user