-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[hostcfgd] Handle Both Service And Timer Units (#5228)
Commit e484ae9 introduced systemd .timer unit to hostcfgd. However, when stopping service that has timer, there is possibility that timer is not running and the service would not be stopped. This PR address this situation by handling both .timer and .service units. signed-off-by: Tamer Ahmed <[email protected]>
- Loading branch information
1 parent
8437f4a
commit dd3e7a6
Showing
1 changed file
with
15 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dd3e7a6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tahmed-dev
When NAT feature is enabled through CLI 'sudo config feature state nat enabled', NAT docker fails to start with the below error. We had to do 'config reload' to enable NAT feature, is this mandatory after this change?
Aug 30 19:21:16.118919 sonic INFO systemd[1]: Reloading.
Aug 30 19:21:16.187453 sonic INFO hostcfgd: Running cmd: 'sudo systemctl enable nat.timer'
Aug 30 19:21:16.197835 sonic INFO hostcfgd[7525]: Failed to enable unit: File nat.timer: No such file or directory
Aug 30 19:21:16.198804 sonic ERR hostcfgd: 'sudo systemctl enable nat.timer' failed. RC: 1, output: None
Aug 30 19:21:16.199541 sonic INFO hostcfgd: Running cmd: 'sudo systemctl start nat.timer'
Aug 30 19:21:16.210134 sonic INFO hostcfgd[7525]: Failed to start nat.timer: Unit nat.timer not found.
Aug 30 19:21:16.211125 sonic ERR hostcfgd: 'sudo systemctl start nat.timer' failed. RC: 5, output: None
Aug 30 19:21:16.211508 sonic INFO hostcfgd: Feature 'nat.timer' is enabled and started
dd3e7a6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kperumalbfn will be fixed via PR:5248