Correctly kill nova-network forked dnsmasq processes
Nova-network OCF script tries to stop dnsmasq processes that might be left after nova-network abnormal termination. It must do that to prevent appearence of two gateways and two DHCP servers in VM network. Right now script stops *all* dnsmasq processes it finds, but this way it kills dnsmasq processes that serves as upstream DNS server, which is managed by 'p_dns' pacemaker resource. Deadlock appears when 'p_vcenter_nova_network' resource tries to stop dnsmasq and 'p_dns' starts it again. Lets just find dnsmasq PIDs that were started by nova-network and terminate them. Change-Id: I4ec7a60e31a0ce02c1924e6294aa767ad840617d Closes-bug: #1458821
This commit is contained in:
parent
9b20ea04b1
commit
cc92ce5894
|
@ -241,8 +241,8 @@ nova_network_cleanup() {
|
|||
fi
|
||||
|
||||
count=0
|
||||
alive=1
|
||||
dnsmasq_pids=$(pgrep dnsmasq)
|
||||
alive=$(ls /var/lib/nova/networks/*.pid | wc -l)
|
||||
dnsmasq_pids=$(cat /var/lib/nova/networks/*.pid)
|
||||
while [ $alive -gt 0 ] && [ $count -lt $shutdown_timeout ]; do
|
||||
ocf_run kill -s TERM $dnsmasq_pids
|
||||
|
||||
|
@ -265,11 +265,10 @@ nova_network_cleanup() {
|
|||
|
||||
if [ $alive -gt 0 ] ; then
|
||||
dnsmasq_pids=$np
|
||||
ocf_log debug "dnsmasq processes started by nova-network still hasn't stopped yet. Waiting ..."
|
||||
fi
|
||||
|
||||
((count+=$iteration_time))
|
||||
|
||||
ocf_log debug "dnsmasq processes started by nova-network still hasn't stopped yet. Waiting ..."
|
||||
done
|
||||
|
||||
if [ $alive -gt 0 ] ; then
|
||||
|
|
Loading…
Reference in New Issue