sonic-buildimage/dockers/docker-platform-monitor
yozhao101 4fa81b4f8d
[dockers] Update critical_processes file syntax (#4831)
**- Why I did it**
Initially, the critical_processes file contains either the name of critical process or the name of group.
For example, the critical_processes file in the dhcp_relay container contains a single group name
`isc-dhcp-relay`. When testing the autorestart feature of each container, we need get all the critical
processes and test whether a  container can be restarted correctly if one of its critical processes is
killed. However, it will be difficult to differentiate whether the names in the critical_processes file are
the critical processes or group names. At the same time, changing the syntax in this file will separate the individual process from the groups and also makes it clear to the user.

Right now the critical_processes file contains two different kind of entries. One is "program:xxx" which indicates a critical process. Another is "group:xxx" which indicates a group of critical processes
managed by supervisord using the name "xxx". At the same time, I also updated the logic to
parse the file critical_processes in supervisor-proc-event-listener script.

**- How to verify it**
We can first enable the autorestart feature of a specified container for example `dhcp_relay` by running the comman `sudo config container feature autorestart dhcp_relay enabled` on DUT. Then we can select a critical process from the command `docker top dhcp_relay` and use the command `sudo kill -SIGKILL <pid>` to kill that critical process. Final step is to check whether the container is restarted correctly or not.
2020-06-25 21:18:21 -07:00
..
base_image_files [submodule update] Add SSD Health tools (#3218) 2019-10-04 10:52:58 -07:00
ssd_tools [submodule update] Add SSD Health tools (#3218) 2019-10-04 10:52:58 -07:00
critical_processes [dockers] Update critical_processes file syntax (#4831) 2020-06-25 21:18:21 -07:00
docker_init.sh [docker-pmon]: use service dependency in supervisord to start services 2020-05-22 11:01:28 -07:00
docker-pmon.supervisord.conf.j2 [docker-pmon]: use service dependency in supervisord to start services 2020-05-22 11:01:28 -07:00
Dockerfile.j2 [docker-pmon]: use service dependency in supervisord to start services 2020-05-22 11:01:28 -07:00
lm-sensors.sh [sensors]: Workaround for apparent bug in lm-sensors (#1058) 2017-10-20 11:01:26 -07:00
start.sh [docker-pmon]: use service dependency in supervisord to start services 2020-05-22 11:01:28 -07:00