f48e8b61cf
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. |
||
---|---|---|
.. | ||
docker-base | ||
docker-base-bullseye | ||
docker-base-buster | ||
docker-base-stretch | ||
docker-basic_router | ||
docker-config-engine | ||
docker-config-engine-bullseye | ||
docker-config-engine-buster | ||
docker-config-engine-stretch | ||
docker-database | ||
docker-dhcp-relay | ||
docker-dhcp-server | ||
docker-eventd | ||
docker-fpm-frr | ||
docker-fpm-gobgp | ||
docker-iccpd | ||
docker-lldp | ||
docker-macsec | ||
docker-mux | ||
docker-nat | ||
docker-orchagent | ||
docker-pde | ||
docker-platform-monitor | ||
docker-ptf | ||
docker-ptf-sai | ||
docker-router-advertiser | ||
docker-sflow | ||
docker-snmp | ||
docker-sonic-gnmi | ||
docker-sonic-mgmt | ||
docker-sonic-mgmt-framework | ||
docker-sonic-p4rt | ||
docker-sonic-restapi | ||
docker-sonic-sdk | ||
docker-sonic-sdk-buildenv | ||
docker-sonic-telemetry | ||
docker-swss-layer-bullseye | ||
docker-swss-layer-buster | ||
docker-teamd | ||
dockerfile-macros.j2 |