Do not kill ipsec on L3 cleanup

In case VPNaaS driver is enabled ipsec process also runs as part of the
l3 agent service and should not be touched by the handler.

Change-Id: I86655567810c61dbed0415afd2e7ff343f20c736
This commit is contained in:
Dmitriy Rabotyagov 2024-09-04 16:22:21 +02:00
parent 6e23144f48
commit 3912bf3a5f

View File

@ -62,7 +62,7 @@
shell: |
cgroup_path=$(findmnt -t cgroup2 -r -n -f -o target)
for ns_pid in $(cat ${cgroup_path}/neutron.slice/neutron-l3-agent.service/cgroup.procs); do
echo $(readlink -f "/proc/$ns_pid/exe") | egrep -qv "keepalived|haproxy"
echo $(readlink -f "/proc/$ns_pid/exe") | egrep -qv "keepalived|haproxy|ipsec"
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\""