From ef367ab2b0ba06942432f0bec3cc339186fb5e99 Mon Sep 17 00:00:00 2001 From: Vivek Reddy Karri Date: Fri, 10 Sep 2021 20:00:40 +0000 Subject: [PATCH 1/2] Job Cancellation Issue fixed Signed-off-by: Vivek Reddy Karri --- config/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/main.py b/config/main.py index 26b1ed4a7f..90531997ee 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(): From 29f9647bfc54cbfa970920264ea0dd0b6e7e3f10 Mon Sep 17 00:00:00 2001 From: Vivek Reddy Karri Date: Sat, 11 Sep 2021 06:09:08 +0000 Subject: [PATCH 2/2] Added job mode for restart sonic.target Signed-off-by: Vivek Reddy Karri --- config/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/main.py b/config/main.py index 90531997ee..f2284051b0 100644 --- a/config/main.py +++ b/config/main.py @@ -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)