Skip to content

[Monit] Fix in memory_checker, skip fetching running containers if Docker engine is not running#30

Closed
liorghub wants to merge 3 commits intomasterfrom
memory_checker_fix
Closed

[Monit] Fix in memory_checker, skip fetching running containers if Docker engine is not running#30
liorghub wants to merge 3 commits intomasterfrom
memory_checker_fix

Conversation

@liorghub
Copy link
Owner

@liorghub liorghub commented Jul 18, 2022

Fix in Monit memory_checker plugin. Skip fetching running containers if Docker engine is not running (can happen in deinit).

Signed-off-by: liora liora@nvidia.com

Why I did it

In the case where Monit runs during deinit flow, memory_checker plugin is fetching the running containers without checking if Docker service is still running. I added this check.

How I did it

Use systemctl is-active to check if Docker engine is still running.

How to verify it

Use systemctl to stop docker engine and reload Monit, no errors in log and relevant print appears in log.

Which release branch to backport (provide reason below if selected)

The fix is required in 202205 and 202012 since the PR that introduced the issue was cherry picked to those branches (sonic-net#11129).

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

…cker engine is not running (can happen in deinit)

Signed-off-by: liora <liora@nvidia.com>
@nazariig
Copy link

@liorghub please don't forget to mark fixed comments as resolved

@liorghub liorghub closed this Jul 18, 2022
liorghub pushed a commit that referenced this pull request Apr 19, 2023
67a3bdf show counters wrong cli output fixed (#36)
5b3eea1 Update package cache, and bail on the first error (#35)
1d221b0 dhcpv6 relay UT code coverage improve (#32)
514b084 dhcpv6 packet handling code refine (#30)

Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants