Skip to content

Commit 2416175

Browse files
authored
[config reload] Fix config reload failure due to sonic.target job cancellation (#1814)
#### What I did Fixes #7508
1 parent 2b12aad commit 2416175

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ def _stop_services():
686686
pass
687687

688688
click.echo("Stopping SONiC target ...")
689-
clicommon.run_command("sudo systemctl stop sonic.target")
689+
clicommon.run_command("sudo systemctl stop sonic.target --job-mode replace-irreversibly")
690690

691691

692692
def _get_sonic_services():
@@ -706,7 +706,7 @@ def _reset_failed_services():
706706

707707
def _restart_services():
708708
click.echo("Restarting SONiC target ...")
709-
clicommon.run_command("sudo systemctl restart sonic.target")
709+
clicommon.run_command("sudo systemctl restart sonic.target --job-mode replace-irreversibly")
710710

711711
try:
712712
subprocess.check_call("sudo monit status", shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)

0 commit comments

Comments
 (0)