Skip to content

Commit

Permalink
Prevent neutron-l3-agent restart killing metadata service
Browse files Browse the repository at this point in the history
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
  • Loading branch information
andrewbonney authored and Dmitriy Rabotyagov committed Mar 18, 2021
1 parent 596f711 commit af9f3b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/main.yml
Expand Up @@ -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 ]; then
if kill -9 "$ns_pid"; then
logger -s "old neutron-l3-agent pid found and has been cleaned up on: \"$ns_pid\""
Expand Down

0 comments on commit af9f3b2

Please sign in to comment.