-
Notifications
You must be signed in to change notification settings - Fork 664
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
[config] Enable/disable container monitoring when starting/stopping the services. #1471
Conversation
stopping services and monitor it again after restarting services when ran the commands `sudo config reload`, `sudo config load` and `sudo config load_minigraph`. Signed-off-by: Yong Zhao <[email protected]>
Signed-off-by: Yong Zhao <[email protected]>
Signed-off-by: Yong Zhao <[email protected]>
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.
PR title is deceptive. This change doesn't completely disable Monit, it only disables the monitoring of containers. Please update accordingly.
Signed-off-by: Yong Zhao <[email protected]>
Great suggestion, Updated! |
Signed-off-by: Yong Zhao <[email protected]>
Signed-off-by: Yong Zhao <[email protected]>
Signed-off-by: Yong Zhao <[email protected]>
Signed-off-by: Yong Zhao <[email protected]>
@jleveque I will create a separate PR to update the submodule. |
@yozhao101, @jleveque this change cannot be cherry-picked to 202012 cleanly, Is there a dependency needs to be cherry-picked? I think this PR is depended on this one: #1199. |
This commit has been reverted from the master branch, so I am removing the "Request for 202012 branch" label. |
Signed-off-by: Yong Zhao [email protected]
What I did
When we ran the command
sudo config load
,sudo config reload
orsudo config load_minigraph
, the containersswss, snmp, lldp, teamd, syncd, snmp, bgp, radv, pmon, dhcp_relay, telemetry
andrestapi
would be stopped and then restarted. The scriptcontainer_checker
ran by Monit will generate false alerting messages into syslog to indicate some containers were not running during such stopping and restarting process. So this PR aims to prevent Monit from generating false alarm messages.How I did it
Before stopping services, we disable Monit to monitor the running status of containers. After restarting services, we enable Monit to monitor the running status of containers again.
How to verify it
I deliberately reduce the monitoring interval of Monit from 60 seconds to 10 seconds to ensure the alerting messages from the script
container_checker
was generated duringsudo config reload, sudo config load and sudo config load_minigraph
. After this change was added into_stop_services(...)
and_restart_services(...)
, I checked that the alerting messages fromcontainer_checker
did not appear in the syslog.I verified this change on the device
str-a7050-acs-3
.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)