-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dhcp_relay] [vlan] [CLI] Add/Del VLAN config should not restart dhcp_relay service #13910
Comments
Hi @vivekrnv. This change is for DHCPv6Relay.
|
Even the updated code today doesn't refresh DHCPv6Relay Config,
this'll the delete the key from redis https://github.com/sonic-net/sonic-utilities/blob/master/config/vlan.py#L50, so there won't be any change for in the config for dhcpv6_relay and restarting the service is not required for v6. As for v4, this is only relevant when an interface is attached to the VLAN https://github.com/sonic-net/sonic-buildimage/blob/master/dockers/docker-dhcp-relay/dhcpv4-relay.agents.j2#L18, if the VLAN doesn't have an interface attached, then the arguments for the v4 binary will look just the same. Same applies to VLAN del, if the VLAN netdev has no iface, the delete of this VLAN doesn't affect DHCP relay So, restarting the service during vlan add/del is not the ideal solution If we really want to make DHCP RELAY work properly in case of dynamic changes to other tables, We should do the restart/refresh of dhcp_relay during the updates to one of VLAN_INTERFACE, PORTCHANNEL_INTERFACE & INTERFACE tables and and not add/del to VLAN table |
Hi @vivekrnv, let me clarify:
So, we think maybe keeping restart dhcp_relay while add/del a vlan and adding check to make sure not restart dhcp_relay in not supported device is better. |
Point 2 will not happen since there is a check already in config command https://github.com/sonic-net/sonic-utilities/blob/master/config/vlan.py#L45 As for point 1, i'd suggest adding a similar check i.e. CLI should fail saying DHCP_RELAY is present. |
@vivekrnv, for adding vlan, agree with you. Because the config has been guaranteed to be removed when vlan del, if it is modified through sonic-db-cli or somewhat else later, it is an unexpected action, vlan add cli should not be responsible for this. But for delete vlan we think it should not be blocked by DHCP_RELAY config, so removing config in DHCP_RELAY table and restart dhcp_relay is necessary (will add some check to avoid restarting dhcp_relay failed). But by our discussion, we can add a parameter for vlan del cli, by default we remove config and restart dhcp_relay, and if the parameter is given, it can do check as what you said. If someone don't want to restart dhcp_relay, can use this parameter. |
Okay, so the decision it to:
Crct? |
Point 1 is correct. |
Hmm, Understand. I'm okay with this change |
@yaqiangz, what is the ETA for fixing this? |
Fixed by sonic-net/sonic-utilities#2688 |
@yaqiangz, can you also update the HLD with the new config/show commands. I believe the changes are present in all the branches 202012+, correct? |
Description
Add/Del a VLAN shouldn't restart the dhcp_relay service
Steps to reproduce the issue:
1. config vlan add 30
Describe the results you received:
Describe the results you expected:
Add/Del a vlan should not restart the dhcpv6 relay service for myriad of reasons:
Adding VLAN doesn't imply anything for dhcp_relay, only when a dhcp server is to be added or when an ipv4 interface is attached to the VLAN, the service must be restarted.
Even for Delete VLAN, we can't assume a restart is required since isc-dhcp-relay only uses the VLAN's which has an interface configured as the upstream interfaces https://github.com/sonic-net/sonic-buildimage/blob/master/dockers/docker-dhcp-relay/dhcpv4-relay.agents.j2#L17
So, i think further analysis is required to understand how to dynamically restart the dhcp_relay service when there is a change to VLAN table but the current change for sure doesn't solve the problem. Thus i'd suggest fixing the changes made here:
sonic-net/sonic-utilities#2660
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered: