Skip to content
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

[201811][dhcp_relay] Properly wait for routed interfaces to be ready before starting relay agent #3442

Merged
merged 2 commits into from
Sep 12, 2019
Merged

[201811][dhcp_relay] Properly wait for routed interfaces to be ready before starting relay agent #3442

merged 2 commits into from
Sep 12, 2019

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented Sep 11, 2019

- What I did

Previous solution wouldn't necessarily wait until interfaces were completely up and configured with an IP address. This solution checks the INTERFACE_TABLE in STATE_DB, which should only report "ok" if the interface is completely up and ready.

Also enhanced the code to only wait for interfaces with an IPv4 address configured, as the DHCP relay agent currently only support IPv4.

This is a port of #3441 for the 201811 branch.

@jleveque jleveque merged commit 92d359d into sonic-net:201811 Sep 12, 2019
@jleveque jleveque deleted the fix_dhcp_relay_wait_for_intf_201811 branch September 12, 2019 17:57
@santoshdoke
Copy link

santoshdoke commented Sep 12, 2019 via email

@jleveque
Copy link
Contributor Author

@santoshdoke: Yes. The problem seen is that the DHCP relay agent was failing to relay DHCP packets. This was caused because the relay agent would open sockets to the configured interfaces before they were fully up and had IP addresses assigned. Restarting the DHCP relay container once all interfaces are fully up and configured properly would resolve the issue. This fix ensures the agent doesn't start until all configured interfaces are truly up and ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants