-
Notifications
You must be signed in to change notification settings - Fork 784
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 timeout is configurable #565
Merged
Merged
Conversation
This file contains 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
Eventually the timeout value will become a CLI argument The default timeout was nestled all the way in the lease constructor This commit is the first step in making the timeout configurable by moving it to the DHCPLease constructor Signed-off-by: toby lorne <[email protected]>
Fixes containernetworking#470 Signed-off-by: toby lorne <[email protected]>
mars1024
reviewed
Jan 13, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basically LGTM
one nit: consider defaulting client timeout to 10s just as https://github.com/d2g/dhcp4client/blob/ef524ad9cb076fe235ecc3c55913ef8445fa35fa/client.go#L39 |
Consistent with https://github.com/d2g/dhcp4client/blob/ef524ad9cb076fe235ecc3c55913ef8445fa35fa/client.go#L39 Signed-off-by: toby lorne <[email protected]> Co-authored-by: bruce ma <[email protected]>
Thanks for your review, I've co-authored a commit which changes the default to 10s |
tlwr
added a commit
to tlwr/cni.dev
that referenced
this pull request
Jan 16, 2021
Related to containernetworking/plugins#565 Signed-off-by: tlwr <[email protected]>
/lgtm |
jellonek
approved these changes
Jan 20, 2021
awesome, thanks! |
tlwr
added a commit
to tlwr/cni.dev
that referenced
this pull request
Feb 5, 2021
Related to containernetworking/plugins#565 Signed-off-by: tlwr <[email protected]>
tlwr
added a commit
to tlwr/cni.dev
that referenced
this pull request
Feb 5, 2021
Related to containernetworking/plugins#565 Added double spaces for formatting Signed-off-by: tlwr <[email protected]>
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
Addresses #470, albeit quite naively. Building on the existing daemon configuration code
A user would deploy the daemon (using the systemd example):
to configure the DHCP client timeout to 15s. The default timeout remains 5s unchanged.
Why
If a user configures their DHCP daemon, because they are in an environment where DHCP responses may take a long time, an IP address will still be allocated for their container
Why not
It is arguable that a simpler solution would be to arbitrarily increase the default timeout to 15s. I can redo this PR to do that instead
Further work
If this is merged I will make a cni.dev PR to document the CLI option, consistent with
hostprefix
and friends