From ce115451d61a422919485926a0c11869ffcbac48 Mon Sep 17 00:00:00 2001 From: Vivek Reddy Date: Wed, 15 Sep 2021 08:27:50 -0700 Subject: [PATCH] [config reload] Removed job-mode for sonic.target restart (#1820) #### What I did As discussed in this PR https://github.com/Azure/sonic-utilities/pull/1814#discussion_r708225104, only the stop.job should have job-mode set to replace irreversibly. Otherwise, simultaneous config reloads in the quick succession, can lead to the behavior. Although ,when the restart job (and all the other dependent jobs) are finished and is taken out of systemd's job queue, the next stop job will not be cancelled. --- config/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/main.py b/config/main.py index f2284051b014..90531997ee04 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 --job-mode replace-irreversibly") + clicommon.run_command("sudo systemctl restart sonic.target") try: subprocess.check_call("sudo monit status", shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)