From 499ad3f489ea9803d4d5d042f6883877304fdbc7 Mon Sep 17 00:00:00 2001 From: Vivek Reddy Date: Sun, 12 Sep 2021 23:59:17 -0700 Subject: [PATCH] [config reload] Fix config reload failure due to sonic.target job cancellation (#1814) #### What I did Fixes https://github.com/Azure/sonic-buildimage/issues/7508 --- config/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/main.py b/config/main.py index b6531eb78e..788686f042 100644 --- a/config/main.py +++ b/config/main.py @@ -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(): @@ -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)