These 3 commits are when the Protocol Buffers files have changed:
Commit: | 2bf9cfd | |
---|---|---|
Author: | George Joseph | |
Committer: | George Joseph |
Add container hostname to DHCP requests and use container id as client id Currently, since a container's hostname isn't sent to netavark, we can't include it in DHCP requests when using a macvlan network and DHCP IPAM driver. Therefore, if DNS records need to be added for a container, it needs to be done by external scripts. Another issue is that since every time a container starts it gets a new random mac address and since, in the absense of a client id, the mac address is used by DHCP servers to keep track of leases, it's likely that the container will get a new ip address on restart. If the container is providing an exposed service, even just ssh, clients may have the old address cached and may not be able to reach the container. This commit accepts the container's hostname on incoming JSON setup commands and adds it to the DHCP client configuration so an Option 12 (Hostname) parameter can be sent in DHCP messages. This should allow DDNS updates of DNS resords. This is dependent on corresponding commits in Podman and common to actually pass the host name of course. This commit also sets the Option 61 (Client identifier) to the container's ID. Since this stays constant across container restarts, it's likely the DHCP server will use the existing lease and return the same IP address. * Added "container_hostname" to network::types::NetworkOptions. The setup command will set this from the incoming JSON and pass it through ultimately to dhcp_service::DhcpV4Service via macvlan_dhcp.get_dhcp_lease(). * Added "container_id" to proxy.proto so it can also be passed to dhcp_service::DhcpV4Service and used to set the client id. * Added tests to test-dhcp/002-setup.bats to check that hostname is passed correctly. Fixes: #676 Signed-off-by: George Joseph <g.devel@wxy78.net>
The documentation is generated from this commit.
Commit: | 5ea45b7 | |
---|---|---|
Author: | Brent Baude | |
Committer: | Brent Baude |
Quit Leasing when Client disconnects Attention: This is a rebase of https://github.com/containers/netavark-dhcp-proxy/pull/61 which was written by Jack Baude. Jack is tied up in school and I simply performed the rebase to netavark after ithe netavark and netavark-dhcp-proxy projects were merged. In the case where a client asks the proxy server for a leased address, it is possible that the client would quit (hangup) before the server could respond. Or more likely, the server is having difficulty obtaining a lease and the client quits. In either case, when the client quits, the server needs to stop trying to aquire a lease. * start using mozim 0.2.1 with async lease capabilities. * fixed timeout type to match mozim 0.2.1 * detect client disconnection with tokio oneshot channel * use async lease DORA Signed-off-by: Brent Baude <bbaude@redhat.com>
Commit: | 8dc8c96 | |
---|---|---|
Author: | Brent Baude | |
Committer: | Paul Holzinger |
Merge nv-dhcp-proxy into nv The proxy is nearing completion and having them in separate repos has become problematic geiven that they both "use" each other. Signed-off-by: Brent Baude <bbaude@redhat.com>