Skip to content

Commit

Permalink
[config reload] Fix config reload failure due to sonic.target job can…
Browse files Browse the repository at this point in the history
…cellation (sonic-net#1814)

#### What I did

Fixes sonic-net/sonic-buildimage#7508
  • Loading branch information
vivekrnv authored and qiluo-msft committed Sep 13, 2021
1 parent 96d658c commit 499ad3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ def _stop_services():
pass

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


def _get_sonic_services():
Expand All @@ -716,7 +716,7 @@ def _reset_failed_services():

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

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

0 comments on commit 499ad3f

Please sign in to comment.