sonic-buildimage/platform/marvell-arm64
yozhao101 be3c036794
[supervisord] Monitoring the critical processes with supervisord. (#6242)
- Why I did it
Initially, we used Monit to monitor critical processes in each container. If one of critical processes was not running
or crashed due to some reasons, then Monit will write an alerting message into syslog periodically. If we add a new process
in a container, the corresponding Monti configuration file will also need to update. It is a little hard for maintenance.

Currently we employed event listener of Supervisod to do this monitoring. Since processes in each container are managed by
Supervisord, we can only focus on the logic of monitoring.

- How I did it
We borrowed the event listener of Supervisord to monitor critical processes in containers. The event listener will take
following steps if it was notified one of critical processes exited unexpectedly:

The event listener will first check whether the auto-restart mechanism was enabled for this container or not. If auto-restart mechanism was enabled, event listener will kill the Supervisord process, which should cause the container to exit and subsequently get restarted.

If auto-restart mechanism was not enabled for this contianer, the event listener will enter a loop which will first sleep 1 minute and then check whether the process is running. If yes, the event listener exits. If no, an alerting message will be written into syslog.

- How to verify it
First, we need checked whether the auto-restart mechanism of a container was enabled or not by running the command show feature status. If enabled, one critical process should be selected and killed manually, then we need check whether the container will be restarted or not.

Second, we can disable the auto-restart mechanism if it was enabled at step 1 by running the commnad sudo config feature autorestart <container_name> disabled. Then one critical process should be selected and killed. After that, we will see the alerting message which will appear in the syslog every 1 minute.

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

 201811
 201911
[x ] 202006
2021-01-21 12:57:49 -08:00
..
docker-syncd-mrvl [supervisord] Monitoring the critical processes with supervisord. (#6242) 2021-01-21 12:57:49 -08:00
docker-syncd-mrvl-rpc [supervisord]: use abspath as supervisord entrypoint (#5995) 2020-11-22 21:18:44 -08:00
linux [Platform] ARM64 support for Marvell ARM platform (#4043) 2020-01-23 16:50:17 -08:00
sai [build]: sonic arm64 changes (#3419) 2019-09-11 09:41:38 -07:00
docker-ptf-mrvl.mk [build]: add docker-ptf-* as stretch docker targets (#4516) 2020-05-01 11:20:33 -07:00
docker-saiserver-mrvl.mk [build]: add docker-saiserver-* as stretch docker targets 2020-05-06 10:23:38 +00:00
docker-syncd-mrvl-rpc.mk [syncd-rpc.mk] install ptf dependancy (#4279) 2020-03-18 11:59:39 -07:00
docker-syncd-mrvl.mk [docker-syncd-vs]: Convert syncd-vs docker to buster (#4726) 2020-06-09 09:07:25 -07:00
libsaithrift-dev.mk [build]: sonic arm64 changes (#3419) 2019-09-11 09:41:38 -07:00
linux-kernel-arm64.mk [build]: add buster docker as the last step of the build proces 2020-04-16 10:26:18 +00:00
one-image.mk [Platform] ARM64 support for Marvell ARM platform (#4043) 2020-01-23 16:50:17 -08:00
platform.conf [Platform] ARM64 support for Marvell ARM platform (#4043) 2020-01-23 16:50:17 -08:00
rules.mk [build]: combine feature and container feature table (#5081) 2020-08-05 13:23:12 -07:00
sai.mk [build]: wait for conflicts package to be uninstalled (#5039) 2020-07-27 10:46:20 -07:00
sonic_fit.its [Marvell] ARM64 Uboot Fit Image for Marvell SONIC image (#4293) 2020-03-19 23:25:38 -07:00