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 27
27
28
28
from neutron ._i18n import _
29
29
from neutron .agent .linux import external_process
30
+ from neutron .agent .linux import utils as linux_utils
30
31
from neutron .cmd import runtime_checks as checks
31
32
from neutron .common import utils
32
33
@@ -504,8 +505,12 @@ def callback(pid_file):
504
505
# will be orphan and prevent keepalived process to be spawned.
505
506
# A check here will let the l3-agent to kill the orphan process
506
507
# and spawn keepalived successfully.
508
+ # Also removes stale pid file
507
509
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 )
509
514
510
515
cmd = ['keepalived' , '-P' ,
511
516
'-f' , config_path ,
You can’t perform that action at this time.
0 commit comments