Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[memory_checker] Do not check memory usage of containers which are no…
…t created (sonic-net#11129) Signed-off-by: Yong Zhao yozhao@microsoft.com Why I did it This PR aims to fix an issue (sonic-net#10088) by enhancing the script memory_checker. Specifically, if container is not created successfully during device is booted/rebooted, then memory_checker do not need check its memory usage. How I did it In the script memory_checker, a function is added to get names of running containers. If the specified container name is not in current running container list, then this script will exit without checking its memory usage. How to verify it I tested on a lab device by following the steps: Stops telemetry container with command sudo systemctl stop telemetry.service Removes telemetry container with command docker rm telemetry Checks whether the script memory_checker ran by Monit will generate the syslog message saying it will exit without checking memory usage of telemetry.
- Loading branch information