sonic-buildimage/files/image_config
Vadym Hlushko 4e865e97a4 [memory_checker] Add a specific log message in a case when the docker service is not running. (#16018)
#### Why I did it
To fix the logic introduced by [[memory_checker] Do not check memory usage of containers which are not created #11129](https://github.com/sonic-net/sonic-buildimage/pull/11129).
There could be a scenario before the reboot, where
1. The `docker service` has stopped
2. In a very short period of time, the monit service performs the `root@sonic:/home/admin# monit status container_memory_telemetry`

In such scenario, the `memory_checker` script will throw an error to the syslog:
```
ERR memory_checker: Failed to retrieve the running container list from docker daemon! Error message is: 'Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))'
```
But, actually, this scenario is a correct behavior, because when the docker service is stopped, the Unix socket is destroyed and that is why we could see the `FileNotFoundError(2, 'No such file or directory'` exception in the syslog.

#### How I did it
Change the log severity to the warning and changed the return value.

#### How to verify it
It is really hard to catch the exact moment described in the `Why I did it` section.
In order to check the logic:
1. Change the Unix socket path to non-existing in [/usr/bin/memory_checker](47742dfc2c/files/image_config/monit/memory_checker (L139)) file on the switch.
2. Execute the `root@sonic:/home/admin# monit restart container_memory_telemetry`
3. Check the syslog for such messages:
```
WARNING memory_checker: Failed to retrieve the running container list from docker daemon! Error message is: 'Error while fetching server API version: ('Connection aborte
d.', FileNotFoundError(2, 'No such file or directory'))'

INFO memory_checker: [memory_checker] Exits without checking memory usage since container 'telemetry' is not running!
```
2023-10-20 12:33:46 +08:00
..
backend_acl [storage_backend] Add backend acl service (#14229) 2023-03-19 22:32:22 +08:00
bash Close console session due to user inactivity (#9890) 2022-02-02 09:41:21 +05:30
config-chassisdb [ChassisDB]: bring up ChassisDB service (#5283) 2020-10-14 15:15:24 -07:00
config-setup Fix CONFIG_DB_INITIALIZED flag check logic and set/reset flag for warmboot (#15685) 2023-08-25 02:32:24 +08:00
constants [chassis] Add templates and code to support VoQ chassis iBGP peers (#5622) 2021-04-16 11:11:32 -07:00
copp [CoPP] Add always_enabled field (#9302) 2021-11-30 11:04:15 -08:00
corefile_uploader Replace os.system and remove subprocess with shell=True (#12177) 2022-11-04 10:48:51 -04:00
cron.d Replace logrotate cron file with (adapted) systemd timer file (#12921) 2023-02-04 09:54:12 +08:00
ebtables [baseimage]: Updates for Ebtables and support for multi-asic (#6542) 2021-01-27 08:36:10 -08:00
environment Update azure.github.io links to sonic-net.github.io (#12209) 2022-10-02 14:02:10 +08:00
fstrim [202012][fstrim] delay fstrim timer after sonic.target (#8737) 2021-09-13 07:37:46 -07:00
hostname Fix to improve hostname handling (#12064) 2022-10-25 14:51:02 -07:00
interfaces Re-add 127.0.0.1/8 when bringing down the interfaces (#15080) 2023-06-16 14:30:34 +08:00
kdump [kdump] Fix kdump error message when a reboot is issued (#7985) 2021-07-01 11:52:38 -07:00
kubernetes Add k8s master feature (#11637) 2022-08-13 23:01:35 +08:00
logrotate update rsyslog log size conf (#15821) 2023-09-01 14:33:30 +08:00
misc [docker-wait-any]: Exit worker thread if main thread is expected to exit (#12255) 2022-10-05 18:14:10 -07:00
monit [memory_checker] Add a specific log message in a case when the docker service is not running. (#16018) 2023-10-20 12:33:46 +08:00
ntp Finalize fast-reboot in warmboot finalizer (#14238) (#14608) 2023-04-11 22:54:56 +08:00
pcie-check Support multiple pcie configuration file and change the pcie status table name to match with pcied changes (#7886) 2021-06-16 16:05:48 -07:00
platform [Bug] Fix SONiC installation failure caused by pip/pip3 not found (#13284) 2023-01-18 16:37:02 +08:00
rasdaemon [image_config] add rasdaemon.timer (#14300) (#14762) 2023-04-22 00:18:05 +08:00
readline Disable brackted-paste mode off by default (#12285) 2022-10-06 07:55:09 -07:00
resolv-config Revert "Clear DNS configuration received from DHCP during networking reconfiguration in Linux. (#13516)" (#14901) 2023-05-01 16:49:08 -07:00
rsyslog Fix rsyslogd start failed cause by rsyslog.conf is emtpy. (#13669) 2023-02-18 06:34:01 +08:00
secureboot [port_config] Introduce ad-hoc mport_config.json file (#8066) 2021-07-15 08:56:35 +08:00
snmp mvrf_avoid_snmp_yml_config: made changes to pass SNMP config from con… (#4057) 2020-01-28 17:41:21 -08:00
sudoers Improve sudo cat command for RO user. (#14428) 2023-04-21 06:32:24 +08:00
sysctl [netlink] Increse netlink buffer size from 3MB to 16MB (#13965) 2023-03-08 06:35:20 +08:00
syslog [baseimage]: /host unmount timeout issue during reboot. (#5032) 2020-07-25 01:27:58 -07:00
system-health [system-health] Add support for monitoring system health (#4835) 2020-10-12 11:12:49 +03:00
systemd Fix issue: systemctl daemon-reload would sporadically cause udev handler fail (#15253) 2023-06-30 02:37:38 +08:00
topology [multi-asic][vs]: Update topology script to retrieve hwsku from minigraph (#6219) 2021-02-18 22:02:29 -08:00
updategraph Remove minigraph loading in updategraph script (#11146) 2022-06-21 08:57:57 +08:00
warmboot-finalizer Fix CONFIG_DB_INITIALIZED flag check logic and set/reset flag for warmboot (#15685) 2023-08-25 02:32:24 +08:00
watchdog-control [sonic-utilities] Build and install as a Python wheel package (#5409) 2020-09-20 20:16:42 -07:00
sonic_release [202211] add release tag (#12864) 2022-11-30 21:27:28 +08:00