[201811][dhcp_relay] Properly wait for routed interfaces to be ready before starting relay agent#3442
Merged
jleveque merged 2 commits intosonic-net:201811from Sep 12, 2019
jleveque:fix_dhcp_relay_wait_for_intf_201811
Merged
[201811][dhcp_relay] Properly wait for routed interfaces to be ready before starting relay agent#3442jleveque merged 2 commits intosonic-net:201811from jleveque:fix_dhcp_relay_wait_for_intf_201811
jleveque merged 2 commits intosonic-net:201811from
jleveque:fix_dhcp_relay_wait_for_intf_201811
Conversation
…before starting relay agent
lguohan
approved these changes
Sep 12, 2019
|
Joe,
Can you please let me know what kind of problem you faced with out this
fix? Do you see that relay is not forwarding packets at times?
Thanks
Santosh
…On Thu, Sep 12, 2019 at 4:23 AM Joe LeVeque ***@***.***> wrote:
*- 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 https://github.com/Azure/sonic-buildimage/pulls for the
201811 branch.
------------------------------
You can view, comment on, or merge this pull request online at:
#3442
Commit Summary
- [201811][dhcp_relay] Properly wait for routed interfaces to be ready
before starting relay agent
File Changes
- *M* dockers/docker-dhcp-relay/wait_for_intf.sh.j2
<https://github.com/Azure/sonic-buildimage/pull/3442/files#diff-0>
(28)
Patch Links:
- https://github.com/Azure/sonic-buildimage/pull/3442.patch
- https://github.com/Azure/sonic-buildimage/pull/3442.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3442>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEXOW3FATI2TZJVK5P2GK2TQJFZHBANCNFSM4IVZVQQQ>
.
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- 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.