-
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
[snmp] Sleep for 20 seconds before service starts #16588
Conversation
@@ -10,6 +10,7 @@ StartLimitIntervalSec=1200 | |||
StartLimitBurst=3 | |||
|
|||
[Service] | |||
ExecStartPre=-/usr/bin/sleep 20 |
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.
Can you test with ExecStartPre=/bin/bash -c "while pgrep intfmgrd > /dev/null; do sleep 1; done"
? This has the advantage of documenting here that this needs the intfmgrd process to be running before this can be started (which in itself is a messy dependency) along with waiting only as much time as necessary before the snmp container is started.
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.
@saiarcot895, updated, now the start pre action will check for intfmgrd
running for at most 20 seconds.
Add pre start check to ensure intfmgrd is running. The check will run for 20 seconds at most. Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
Add pre start check to ensure intfmgrd is running. The check will run for 20 seconds at most. Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Add pre start check to ensure intfmgrd is running. The check will run for 20 seconds at most. Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Cherry-pick PR to 202211: #16880 |
Cherry-pick PR to 202205: #16881 |
Add pre start check to ensure intfmgrd is running. The check will run for 20 seconds at most. Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Cherry-pick PR to 202305: #16911 |
2 similar comments
Add pre start check to ensure intfmgrd is running. The check will run for 20 seconds at most. Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Add pre start check to ensure intfmgrd is running. The check will run for 20 seconds at most. Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Why I did it
Fixes #16486
Work item tracking
How I did it
As
snmp
depends onintfmgrd
to work, let's add a check to ensureintfmgrd
is running.The check will run for 20 seconds at most.
How to verify it
Do
config reload
and confirmssnmpd
is started afterintfmgrd
setups all the loopback interfaces.Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)