Skip to content

[config reload] Removed replace irreversibly job-mode for sonic.target restart#1820

Merged
qiluo-msft merged 1 commit intosonic-net:masterfrom
vivekrnv:config_reload_repair
Sep 15, 2021
Merged

[config reload] Removed replace irreversibly job-mode for sonic.target restart#1820
qiluo-msft merged 1 commit intosonic-net:masterfrom
vivekrnv:config_reload_repair

Conversation

@vivekrnv
Copy link
Copy Markdown
Contributor

@vivekrnv vivekrnv commented Sep 14, 2021

Signed-off-by: Vivek Reddy Karri [email protected]

What I did

As discussed in this PR #1814 (comment), 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.

admin@sonic:~$ sudo systemctl restart sonic.target --job-mode replace-irreversibly
admin@sonic:~$ sudo systemctl stop sonic.target --job-mode replace-irreversibly (Ran Immediately)
Failed to stop sonic.target: Transaction for sonic.target/stop is destructive (ntp-config.service has 'start' job queued, but 'stop' is included in transaction).
See system logs and 'systemctl status sonic.target' for details.
(After all the dependent jobs of restart sonic.target  are done, it works)
admin@sonic:~$ sudo systemctl stop sonic.target --job-mode replace-irreversibly
admin@sonic:

How I did it

How to verify it

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

@vivekrnv
Copy link
Copy Markdown
Contributor Author

@stepanblyschak , @nazariig, @rajendra-dendukuri, @qiluo-msft Please review

@vivekrnv
Copy link
Copy Markdown
Contributor Author

Required for 202012

@nazariig
Copy link
Copy Markdown
Collaborator

@qiluo-msft
Copy link
Copy Markdown
Contributor

qiluo-msft commented Sep 15, 2021

Do you need it on 202106 branch?

@vivekrnv
Copy link
Copy Markdown
Contributor Author

Do you need it on 20202106 branch?

Yes

@qiluo-msft qiluo-msft merged commit ce11545 into sonic-net:master Sep 15, 2021
qiluo-msft pushed a commit that referenced this pull request Sep 15, 2021
#### What I did

As discussed in this PR #1814 (comment), 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.
judyjoseph pushed a commit that referenced this pull request Sep 27, 2021
#### What I did

As discussed in this PR #1814 (comment), 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.
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 18, 2022
Included Commits
92d0744 [config reload] Removed job-mode for sonic.target restart (sonic-net#1820)
c28fb22 [ci]: Support PR coverage (sonic-net#1806)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants