Skip to content

Commit 7e1e3d1

Browse files
authored
Merge pull request #197 from stackhpc/upstream/2023.1-2025-02-03
Synchronise 2023.1 with upstream
2 parents 9270119 + 6c2b89c commit 7e1e3d1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

neutron/agent/linux/keepalived.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
from neutron._i18n import _
2929
from neutron.agent.linux import external_process
30+
from neutron.agent.linux import utils as linux_utils
3031
from neutron.cmd import runtime_checks as checks
3132
from neutron.common import utils
3233

@@ -504,8 +505,12 @@ def callback(pid_file):
504505
# will be orphan and prevent keepalived process to be spawned.
505506
# A check here will let the l3-agent to kill the orphan process
506507
# and spawn keepalived successfully.
508+
# Also removes stale pid file
507509
if vrrp_pm.active:
508-
vrrp_pm.disable()
510+
vrrp_pm.disable(delete_pid_file=False)
511+
512+
linux_utils.delete_if_exists(self.get_vrrp_pid_file_name(pid_file),
513+
run_as_root=vrrp_pm.run_as_root)
509514

510515
cmd = ['keepalived', '-P',
511516
'-f', config_path,

0 commit comments

Comments
 (0)