diff --git a/config/main.py b/config/main.py index 26b1ed4a7ff9..f2284051b014 100644 --- a/config/main.py +++ b/config/main.py @@ -686,7 +686,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(): @@ -706,7 +706,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)