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

dhcp-relay: dhcrelay daemon is permantly blocked and not starting #2105

Closed
wants to merge 4 commits into from

Conversation

nikos-github
Copy link
Collaborator

Fixes #2092

Problem:
An admin status up interface in config_db.json without an IP address will cause dhcrelay daemon to block permanently and not start.

Fix and verification:
Reproduced and verified manually by running sonic-cfggen -d -t /usr/share/sonic/templates/wait_for_intf.sh.j2 > /usr/bin/wait_for_intf.sh and then running /usr/bin/wait_for_intf.sh.

Regards,

Nikos.-

- A picture of a cute animal (not mandatory but encouraged)
┈┈╭━╱▔▔▔▔╲━╮┈┈┈
┈┈╰╱╭▅╮╭▅╮╲╯┈┈┈
╳┈┈▏╰┈▅▅┈╯▕┈┈┈┈
┈┈┈╲┈╰━━╯┈╱┈┈╳┈
┈┈┈╱╱▔╲╱▔╲╲┈┈┈┈
┈╭━╮▔▏┊┊▕▔╭━╮┈╳
┈┃┊┣▔╲┊┊╱▔┫┊┃┈┈
┈╰━━━━╲╱━━━━╯┈╳

{% for (name, prefix) in INTERFACE %}
{% if prefix != '0.0.0.0/0' %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a special use-case where you actually set the IP to "0.0.0.0"? By default, if there is no IP configured, there should not even be an INTERFACE object, only a PORT object should be present.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explicitly setting the IP address to "0.0.0.0" to imply an interface has no IP address is not a clean solution.

In the next week or so, the framework for VRF will be added to SONiC. With this change, the INTERFACES table will contain interfaces without any IP address assigned. Once this change is merged, you should be able to key off of whether or not the interface has an IP address assigned here, which is a more appropriate solution. Please see the design docs here for reference.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting the IP address of an interface to 0.0.0.0 is valid config and all linux cli deals with it and accepts it. Application can also listen on 0.0.0.0 and 0.0.0.0 is also used as source IP (eg DHCP).

Not sure why you think it shouldn't be allowed or why it should be restricted on sonic side.

@msftclas
Copy link

msftclas commented Oct 1, 2018

CLA assistant check
All CLA requirements met.

@nikos-github
Copy link
Collaborator Author

Closing this after discussing with Guohan.

@nikos-github nikos-github deleted the dhcrelay-fix branch October 2, 2018 21:12
shi-su added a commit that referenced this pull request Jan 11, 2022
Why I did it
Update the sonic-swss submodule. The following are new commits in the submodule.

6dae6b8 Add initial value for weight in overlay nexthops (#2096)
d3cd402 [p4rt-tests] Bind response consumer to appl_state_db (#2105)
43e54e5 Fix armhf buildimage artifacts not found issue (#2107)

How I did it
Update the swss submodule pointer.
theasianpianist pushed a commit to theasianpianist/sonic-buildimage that referenced this pull request Feb 5, 2022
What I did
In p4rt test scripts, bind response consumer to appl_state_db for consistency.

Why I did it
In p4orch, the relating notification producer for table P4RT_TABLE is on database appl state db

How I verified it
Run vstest

Details if related
notification channel name would be tagged dbId - sonic-net/sonic-swss-common#568
vdahiya12 added a commit to vdahiya12/sonic-buildimage that referenced this pull request Mar 24, 2022
582d740 (HEAD -> 202012, origin/202012) [show] add support for hwstatus in show muxcable status (sonic-net#1961) (sonic-net#2105)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
vdahiya12 added a commit that referenced this pull request Mar 24, 2022
This PR updates the following commits in sonic-utilities

582d740 (HEAD -> 202012, origin/202012) [show] add support for hwstatus in show muxcable status (#1961) (#2105)


Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants