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

docker-dhcp-relay: Fix waiting for interfaces to get set up #9034

Merged
merged 2 commits into from
Oct 22, 2021

Conversation

saiarcot895
Copy link
Contributor

Fix the check used to wait for interfaces to come up. The group name in
the supervisor config files has changed from isc-dhcp-relay to
dhcp-relay.

Also, in the wait script, wait 10 additional seconds after the vlans,
port channels, and any interfaces are up. This is because dhcrelay
listens on all interfaces (in addition to port channels and vlans), and
to ensure that it stays in a clean state during runtime, wait some extra
time to make sure that those interfaces are created as well.

Signed-off-by: Saikrishna Arcot sarcot@microsoft.com

Why I did it

How I did it

How to verify it

In the output of sudo ss -nlp, for dhcrelay and dhcp6relay, verify that all of the sockets that are bound to an interface have a valid interface name, and not some interface index number (e.g. if512, if4294967295, ...).

Example of sockets bound to interfaces that no longer exist:

udp                UNCONN              0                    0                                                                                    0.0.0.0%if1689:67                                                0.0.0.0:*                      users:(("dhcrelay",pid=155973,fd=13))
udp                UNCONN              0                    0                                                                                    0.0.0.0%if1690:67                                                0.0.0.0:*                      users:(("dhcrelay",pid=155973,fd=12))
udp                UNCONN              0                    0                                                                                    0.0.0.0%if1691:67                                                0.0.0.0:*                      users:(("dhcrelay",pid=155973,fd=11))
udp                UNCONN              0                    0                                                                                    0.0.0.0%if1692:67                                                0.0.0.0:*                      users:(("dhcrelay",pid=155973,fd=10))
udp                UNCONN              0                    0                                                                                    0.0.0.0%if1693:67                                                0.0.0.0:*                      users:(("dhcrelay",pid=155973,fd=9))
udp                UNCONN              0                    0                                                                                    0.0.0.0%if1694:67                                                0.0.0.0:*                      users:(("dhcrelay",pid=155973,fd=8))
udp                UNCONN              0                    0                                                                                    0.0.0.0%if1695:67                                                0.0.0.0:*                      users:(("dhcrelay",pid=155973,fd=7))

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

Sloth

Fix the check used to wait for interfaces to come up. The group name in
the supervisor config files has changed from isc-dhcp-relay to
dhcp-relay.

Also, in the wait script, wait 10 additional seconds after the vlans,
port channels, and any interfaces are up. This is because dhcrelay
listens on all interfaces (in addition to port channels and vlans), and
to ensure that it stays in a clean state during runtime, wait some extra
time to make sure that those interfaces are created as well.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
yxieca
yxieca previously approved these changes Oct 21, 2021
kellyyeh
kellyyeh previously approved these changes Oct 21, 2021
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
@saiarcot895 saiarcot895 dismissed stale reviews from kellyyeh and yxieca via e559e67 October 21, 2021 18:07
@saiarcot895 saiarcot895 merged commit c1d5e06 into sonic-net:master Oct 22, 2021
@saiarcot895 saiarcot895 deleted the dhcprelay-fix-start-delay branch October 22, 2021 01:45
yxieca pushed a commit that referenced this pull request Oct 22, 2021
Fix the check used to wait for interfaces to come up. The group name in
the supervisor config files has changed from isc-dhcp-relay to
dhcp-relay.

Also, in the wait script, wait 10 additional seconds after the vlans,
port channels, and any interfaces are up. This is because dhcrelay
listens on all interfaces (in addition to port channels and vlans), and
to ensure that it stays in a clean state during runtime, wait some extra
time to make sure that those interfaces are created as well.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
@kellyyeh kellyyeh mentioned this pull request Oct 25, 2021
5 tasks
judyjoseph pushed a commit that referenced this pull request Nov 14, 2021
Fix the check used to wait for interfaces to come up. The group name in
the supervisor config files has changed from isc-dhcp-relay to
dhcp-relay.

Also, in the wait script, wait 10 additional seconds after the vlans,
port channels, and any interfaces are up. This is because dhcrelay
listens on all interfaces (in addition to port channels and vlans), and
to ensure that it stays in a clean state during runtime, wait some extra
time to make sure that those interfaces are created as well.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
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.

4 participants