File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 2727
2828from neutron ._i18n import _
2929from neutron .agent .linux import external_process
30+ from neutron .agent .linux import utils as linux_utils
3031from neutron .cmd import runtime_checks as checks
3132from 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 ,
You can’t perform that action at this time.
0 commit comments