-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[services] make snmp.timer work again and delay telemetry.service #3742
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f9fc076
[services] make snmp.timer work again and delay telemetry.service
b0e66f5
Merge commit 'refs/pull/3657/head' of github.com:azure/sonic-buildimage
8f8f1c9
[services][snmp] snmp service should stop/start/restart with
76504c7
[sonic_debian_extentions] add telemetry timer only when telemetry is …
0906255
[snmp] add newline at the end of file in service file
c3e7bfd
Merge branch 'master' into timers
stepanblyschak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
[Unit] | ||
Description=Delays snmp container until SONiC has started | ||
Conflicts=snmp.service | ||
|
||
[Timer] | ||
OnUnitActiveSec=0 sec | ||
OnBootSec=3min 30 sec | ||
Unit=snmp.service | ||
|
||
[Install] | ||
WantedBy=timers.target | ||
WantedBy=timers.target swss.service |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=Delays telemetry container until SONiC has started | ||
|
||
[Timer] | ||
OnBootSec=3min 30 sec | ||
Unit=telemetry.service | ||
|
||
[Install] | ||
WantedBy=timers.target |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
By remove these 2 lines, restarting swss will no longer restarting snmp. You need to add snmp as a dependent of swss similar https://github.com/Azure/sonic-buildimage/blob/master/files/scripts/swss.sh#L5. But you need to add a logic to ignore this dependency if the uptime is less than 210 seconds.
I see that you did it with snmp.timer below.
I am wondering if we should use systemctrld to manage these dependencies that beyond the scope of systemctrld?
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.
If we will ignore snmp dependency in swss.sh if uptime is less than 210 sec, then who will start snmp? looks like we still need snmp.timer so the complexity will not decrease and we will have 210 sec hard coded in two places.
If the desired behavior can be done with systemd then why to do that in scripts?