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

net/dhcp: bump dhcpcd timeout to 300s #5127

Merged
merged 1 commit into from
Apr 1, 2024
Merged

Conversation

cjp256
Copy link
Contributor

@cjp256 cjp256 commented Apr 1, 2024

On most distros, including Ubuntu, the default timeout for dhclient is 300s. There is no cloud-init controlled duration for the dhclient process as it doesn't fork and there is no timeout value passed to subp().

I have seen some distros configure dhclient with a timeout of 60s, but is far less common.

Given that a cloud VM is not very useful with DHCP, err on the generous side and allow up to 300 seconds for dhcpcd to get an address.

Note that there is still an issue with dhcpcd retries which will be addressed later in a separate PR.

On most distros, including Ubuntu, the default timeout for dhclient is 300s.
There is no cloud-init controlled duration for the dhclient process as
it doesn't fork and there is no timeout value passed to subp().

I have seen some distros configure dhclient with a timeout of 60s, but
is far less common.

Given that a cloud VM is not very useful with DHCP, err on the generous
side and allow up to 300 seconds for dhcpcd to get an address.

Note that there is still an issue with dhcpcd retries which will be
addressed later in a separate PR.

Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
Copy link
Member

@holmanb holmanb left a comment

Choose a reason for hiding this comment

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

Thanks for this PR @cjp256. Matching dhclient timeout behavior is probably best.

There is no cloud-init controlled duration for the dhclient process as it doesn't fork and there is no timeout value passed to subp().

It does fork, but not until after the receiving an IP address. This is why we clean up the daemon.

@holmanb holmanb merged commit 372e80f into canonical:main Apr 1, 2024
27 of 28 checks passed
@cjp256 cjp256 deleted the dhcpcd-timeout branch April 1, 2024 21:44
blackboxsw pushed a commit to blackboxsw/cloud-init that referenced this pull request Apr 2, 2024
On most distros, including Ubuntu, the default timeout for dhclient is 300s.
There is no cloud-init controlled duration for the dhclient process as
it doesn't fork until after it receives an IP address and there is no timeout
value passed to subp().

I have seen some distros configure dhclient with a timeout of 60s, but
is far less common.

Given that a cloud VM is not very useful with DHCP, err on the generous
side and allow up to 300 seconds for dhcpcd to get an address.

Note that there is still an issue with dhcpcd retries which will be
addressed later in a separate PR.

Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
@holmanb holmanb added the 24.1 label Apr 2, 2024
blackboxsw pushed a commit to blackboxsw/cloud-init that referenced this pull request Apr 2, 2024
On most distros, including Ubuntu, the default timeout for dhclient is 300s.
There is no cloud-init controlled duration for the dhclient process as
it doesn't fork until after it receives an IP address and there is no timeout
value passed to subp().

I have seen some distros configure dhclient with a timeout of 60s, but
is far less common.

Given that a cloud VM is not very useful with DHCP, err on the generous
side and allow up to 300 seconds for dhcpcd to get an address.

Note that there is still an issue with dhcpcd retries which will be
addressed later in a separate PR.

Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
blackboxsw pushed a commit to blackboxsw/cloud-init that referenced this pull request Apr 3, 2024
On most distros, including Ubuntu, the default timeout for dhclient is 300s.
There is no cloud-init controlled duration for the dhclient process as
it doesn't fork until after it receives an IP address and there is no timeout
value passed to subp().

I have seen some distros configure dhclient with a timeout of 60s, but
is far less common.

Given that a cloud VM is not very useful with DHCP, err on the generous
side and allow up to 300 seconds for dhcpcd to get an address.

Note that there is still an issue with dhcpcd retries which will be
addressed later in a separate PR.

Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
holmanb pushed a commit that referenced this pull request Apr 3, 2024
On most distros, including Ubuntu, the default timeout for dhclient is 300s.
There is no cloud-init controlled duration for the dhclient process as
it doesn't fork until after it receives an IP address and there is no timeout
value passed to subp().

I have seen some distros configure dhclient with a timeout of 60s, but
is far less common.

Given that a cloud VM is not very useful with DHCP, err on the generous
side and allow up to 300 seconds for dhcpcd to get an address.

Note that there is still an issue with dhcpcd retries which will be
addressed later in a separate PR.

Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
holmanb pushed a commit that referenced this pull request Apr 3, 2024
On most distros, including Ubuntu, the default timeout for dhclient is 300s.
There is no cloud-init controlled duration for the dhclient process as
it doesn't fork until after it receives an IP address and there is no timeout
value passed to subp().

I have seen some distros configure dhclient with a timeout of 60s, but
is far less common.

Given that a cloud VM is not very useful with DHCP, err on the generous
side and allow up to 300 seconds for dhcpcd to get an address.

Note that there is still an issue with dhcpcd retries which will be
addressed later in a separate PR.

Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
holmanb pushed a commit that referenced this pull request Apr 3, 2024
On most distros, including Ubuntu, the default timeout for dhclient is 300s.
There is no cloud-init controlled duration for the dhclient process as
it doesn't fork until after it receives an IP address and there is no timeout
value passed to subp().

I have seen some distros configure dhclient with a timeout of 60s, but
is far less common.

Given that a cloud VM is not very useful with DHCP, err on the generous
side and allow up to 300 seconds for dhcpcd to get an address.

Note that there is still an issue with dhcpcd retries which will be
addressed later in a separate PR.

Signed-off-by: Chris Patterson <cpatterson@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.

2 participants