-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
Add support for DHCP renewals for OCI containers #1106
Comments
Yeah, that's a known limitation of the current approach to DHCP. Unlike regular containers, application containers don't perform their own network configuration and so can't run a regular DHCP client. Incus performs an initial DHCP handshake on startup through a pre-start hook but that's just a one time action. It shouldn't be too difficult to have that process to stay around in the background but there are security concerns that would need to be considered at that stage. |
Another problem is that even if you set a static IP address for an OCI container, the DNS entry "expires" after a certain time. The workaround for this is to simply use the configured static IP addresses instead of the DNS name when you want to communicate from another system or application container to another application container. |
Yeah, the DNS records are likely to be very useful for OCI containers, so definitely something we want to fix :) |
I do not want to hijack this thread but it would be awesome to loop the following too :) |
Would really appreciate if this could be added into one of the next minor releases. Just had a lot fun to re-org IP's after a major system reboot. As long as the IP can stick with the container would be a start but having DNS working would be even better. Interesting enough it seems IPV6 are not really effected? According to "incus network list-allocations" IPV6 are still listed where as IPV4 are gone. |
By default, Incus containers use SLAAC to configure their own IPv6 address and thus don't need DHCPv6 and so leases aren't an issue AFAICS ( Every time I've had DHCP issues with my containers (even proper system containers), they still had IPv6 addresses (though this has lead to me not noticing a network configuration issue because my home IP has IPv6 so I can access services but folks from non-IPv6 networks can't). |
Closes lxc#1106 Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Closes lxc#1106 Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Closes lxc#1106 Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Thanks for considering adding this feature @stgraber! Really appreciate it. |
Closes lxc#1106 Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Just setup a back office for our start-up with everything in incus, and this is our only remaining issue. I look forward to seeing this in the next release. Thanks, @stgraber |
It's been about 24 hours since I updated to the new release, and things are working well. Thanks! |
Required information
Output of `incus info`
Issue description
OCI containers in bridge networks don’t seem to renew their IPv4 DHCP leases. I noticed this because they also vanish from the DNS server.
After (re)starting the containers, they are assigned an IPv4 and IPv6 address and show up in
incus network list-leases <network_name>
. But after some time (probably the DHCP lease expiry, so 1h by default), their hostname fails to resolve and their IPv4 lease vanishes from the command output.Steps to reproduce
Possible Workaround
Set the
ipv4.dhcp.expiry
config option of the network to a high value like8765h
.The text was updated successfully, but these errors were encountered: