From 7eb2020f7fa3d8337c84f2e860410a9a64e9ef9a Mon Sep 17 00:00:00 2001 From: Andrew Bonney Date: Fri, 12 Feb 2021 11:56:57 +0000 Subject: [PATCH] Prevent neutron-l3-agent restart killing metadata service The existing handler which prevents keepalived from being killed during neutron-l3-agent restarts doesn't go far enough at present. This patch adjusts the processes which are killed to exclude the haproxy instance which is responsible for proxying the Nova metadata service. Change-Id: I407c6662841bec9d3e3208d2e46bd7d1d5db00fb --- handlers/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/main.yml b/handlers/main.yml index 0551003d..c2b20f15 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -58,7 +58,7 @@ - name: Run neutron-l3-agent process cleanup shell: | for ns_pid in $(cat /sys/fs/cgroup/pids/neutron.slice/neutron-l3-agent.service/cgroup.procs); do - echo $(readlink -f "/proc/$ns_pid/exe") | grep -qv "keepalived" + echo $(readlink -f "/proc/$ns_pid/exe") | egrep -qv "keepalived|haproxy" if [ $? -eq 0 ] || [ "{{ neutron_l3_cleanup_on_shutdown | bool }}" = "True" ]; then if kill -9 "$ns_pid"; then logger -s "old neutron-l3-agent pid found and has been cleaned up on: \"$ns_pid\""