sonic-buildimage/dockers/docker-dhcp-relay
Yaqiang Zhu f48e8b61cf [dhcp_relay] Use dhcprelayd to manage critical processes (#17236)
Modify j2 template files in docker-dhcp-relay. Add dhcprelayd to group dhcp-relay instead of isc-dhcp-relay-VlanXXX, which would make dhcprelayd to become critical process.
In dhcprelayd, subscribe FEATURE table to check whether dhcp_server feature is enabled.
2.1 If dhcp_server feature is disabled, means we need original dhcp_relay functionality, dhcprelayd would do nothing. Because dhcrelay/dhcpmon configuration is generated in supervisord configuration, they will automatically run.
2.2 If dhcp_server feature is enabled, dhcprelayd will stop dhcpmon/dhcrelay processes started by supervisord and subscribe dhcp_server related tables in config_db to start dhcpmon/dhcrelay processes.
2.3 While dhcprelayd running, it will regularly check feature status (by default per 5s) and would encounter below 4 state change about dhcp_server feature:
A) disabled -> enabled
In this scenario, dhcprelayd will subscribe dhcp_server related tables and stop dhcpmon/dhcrelay processes started by supervisord and start new pair of dhcpmon/dhcrelay processes. After this, dhcpmon/dhcrelay processes are totally managed by dhcprelayd.
B) enabled -> enabled
In this scenaro, dhcprelayd will monitor db changes in dhcp_server related tables to determine whether to restart dhcpmon/dhrelay processes.
C) enabled -> disabled
In this scenario, dhcprelayd would unsubscribe dhcp_server related tables and kill dhcpmon/dhcrelay processes started by itself. And then dhcprelayd will start dhcpmon/dhcrelay processes via supervisorctl.
D) disabled -> disabled
dhcprelayd will check whether dhcrelay processes running status consistent with supervisord configuration file. If they are not consistent, dhcprelayd will kill itself, then dhcp_relay container will stop because dhcprelayd is critical process.
2023-12-04 22:14:02 +00:00
..
cli [dhcp_server] Add dhcprelayd for dhcp_server feature (#16947) 2023-11-02 08:09:01 -07:00
cli-plugin-tests [dhcp_server] Add dhcprelayd for dhcp_server feature (#16947) 2023-11-02 08:09:01 -07:00
critical_processes Incorporate DHCPv6 Relay Agent into dhcp-relay docker (#8321) 2021-09-22 16:05:03 -07:00
dhcp_relay_regex.json Fix regex and process name (#16647) 2023-09-26 16:15:27 -07:00
dhcp-relay.monitors.j2 Fix dependency of dhcp-mon on VLAN with only v6 (#13006) 2022-12-09 14:41:07 -08:00
dhcp-relay.programs.j2 [dhcp_relay] Use dhcprelayd to manage critical processes (#17236) 2023-12-04 22:14:02 +00:00
dhcpv4-relay.agents.j2 [dhcp-relay]: Modify dhcp relay to pick primary address (#17012) 2023-12-04 22:14:02 +00:00
dhcpv6-relay.agents.j2 advance dhcprelay to 6a6ce24, add default dhcpv6 dualtor source interface (#15864) 2023-07-17 15:28:10 -07:00
docker_init.sh [supervisord]: use abspath as supervisord entrypoint (#5995) 2020-11-22 21:18:44 -08:00
docker-dhcp-relay.supervisord.conf.j2 [dhcp_relay] Use dhcprelayd to manage critical processes (#17236) 2023-12-04 22:14:02 +00:00
Dockerfile.j2 [dhcp_relay] Use dhcprelayd to manage critical processes (#17236) 2023-12-04 22:14:02 +00:00
events_info.json Fix regex and process name (#16647) 2023-09-26 16:15:27 -07:00
port-name-alias-map.txt.j2 [dhcp-relay] Reduce Calls to SONiC Cfggen (#5175) 2020-08-17 15:47:14 -07:00
start.sh Timezone sync issue between the host and containers (#14000) 2023-06-25 16:36:09 -07:00
wait_for_intf.sh.j2 [DHCP_RELAY] Updated wait_for_intf.sh to wait for ipv6 global and link local addr (#12273) 2022-10-12 11:46:20 +03:00