sonic-buildimage/files
Lior Avramov ff3ad9ddd1 [memory_checker] Do not check memory usage of containers if docker daemon is not running (#11476)
Fix in Monit memory_checker plugin. Skip fetching running containers if docker engine is down (can happen in deinit).
This PR fixes issue #11472.

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 (#11129).
2022-07-28 20:37:22 +00:00
..
Aboot [Build]: Support to use symbol links for lazy installation targets to reduce the image size (#10923) 2022-06-28 16:03:16 +00:00
apt [Build]: Fix armhf mirrors not existing issue (#10312) 2022-03-22 15:24:15 +08:00
build/versions [ci/build]: Upgrade SONiC package versions (#11425) 2022-07-13 07:08:33 +08:00
build_scripts [hostcfgd]: Add Ability To Configure Feature During Run-time (#6700) 2021-03-13 05:56:27 -08:00
build_templates Enable ARP Update Script for Packet based chassis. (#11465) 2022-07-28 20:36:54 +00:00
dhcp ZTP infrastructure changes to support DHCP discovery provisioning data (#3298) 2019-12-10 08:16:56 -08:00
docker Enabling ipv6 support on docker container network. This is needed (#5418) 2020-09-22 08:32:17 -07:00
image_config [memory_checker] Do not check memory usage of containers if docker daemon is not running (#11476) 2022-07-28 20:37:22 +00:00
initramfs-tools [initramfs]: SSD firmware upgrade in initramfs (#10748) 2022-05-12 08:11:02 -07:00
scripts Enable ARP Update Script for Packet based chassis. (#11465) 2022-07-28 20:36:54 +00:00
sshd Remove SSH host keys after installing the custom version of sshd (#10633) 2022-04-25 10:38:52 -07:00