From 2416175267d82f940417fe350e7172781f5c46ec 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 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)