Skip to content

[Request]: IPv6: allow DNS configuration update after container.create(). #466

Description

@jglogan

Feature or enhancement request details

After the container VM starts, container.create() calls the agent to write the DNS configuration.

For user-defined configurations, or for IPv4 DNS autoconfig (using the DNS proxy on the NAT bridge), all information is known prior to creation and can be supplied in the initial configuration.

For IPv6 DNS autoconfig, it's necessary for the NAT bridge to be up and running, and for IPv6 address setup to be complete before the DNS proxy address is available. We can approach this in a couple of ways:

  • Acquire the server address using SystemConfiguration dynamic store notifications (see Autoconfigure IPv6 DNS proxy. container#1007), and then update the DNS configuration using the vminitd API).
  • In vminitd, monitor router advertisements for RDNSS information and apply the configuration updates.

We also need to figure out how best to apply the updates. We don't want to rely on the autoconfiguration taking place within a set time period, or at all – we don't want to block starting the workload on configuration completion.

Updating resolv.conf after the workload starts presents other challenges, though.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    next
    on Jan 2, 2026
  2. added theissue type on Jan 2, 2026
  3. changed the title [-][Request]: Allow DNS configuration update after `container.create()`.[/-] [+][Request]: IPv6: allow DNS configuration update after `container.create()`.[/+] on Jan 2, 2026
  4. added this to the 2026-01 milestone on Jan 24, 2026
  5. self-assigned this
    on Jan 24, 2026
  6. modified the milestones: 2026-01, 2026-02 on Jan 31, 2026
  7. jglogan commented on Feb 4, 2026

    @jglogan
    ContributorAuthor

    This illustrates the nature of the problem of starting the workload before the IPv6 stack is configured:

    % container run -it --rm alpine:latest sh -c "sleep 5 ; ping6 -c 1 www.google.com" 
    PING www.google.com (2607:f8b0:4005:812::2004): 56 data bytes
    64 bytes from 2607:f8b0:4005:812::2004: seq=0 ttl=118 time=21.444 ms
    
    --- www.google.com ping statistics ---
    1 packets transmitted, 1 packets received, 0% packet loss
    round-trip min/avg/max = 21.444/21.444/21.444 ms
    
    % container run -it --rm alpine:latest sh -c "sleep 1 ; ping6 -c 1 www.google.com"
    PING www.google.com (2607:f8b0:4005:812::2004): 56 data bytes
    ping6: sendto: Network unreachable
    
  8. jglogan commented on Feb 8, 2026

    @jglogan
    ContributorAuthor

    Did some experimentation with an ICMP library I coded up so we could see how DNS config through router advertisement RDNSS options would work.

    This is the boot log for the first container on a network. The IPv6 DNS server option is seen four seconds after the workload process starts. This poses a problem for IPv6-only environments that need name resolution immediately.

    The delay for the second container (the vmnet network already exists) seems to be a bit less, like 2-3 sec.

    2026-02-08T21:48:14+0000 info vminitd: iteration=1 [vminitd] requesting router advertisement
    2026-02-08T21:48:14+0000 error vminitd: error=could not send ICMP packet, errno = 99 [vminitd] failed to receive router advertisement
    2026-02-08T21:48:14+0000 debug vminitd: interface=lo up=true [vminitd] ipLinkSet
    2026-02-08T21:48:14+0000 debug vminitd: key=PATH value=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin [vminitd] setenv
    2026-02-08T21:48:14+0000 debug vminitd: destination=/tmp source=tmpfs type=tmpfs [vminitd] mount
    2026-02-08T21:48:14+0000 debug vminitd: destination=/dev/pts source=devpts type=devpts [vminitd] mount
    2026-02-08T21:48:14+0000 debug vminitd: destination=/run/container/foo/rootfs source=/dev/vdb type=ext4 [vminitd] mount
    [    0.245962] EXT4-fs (vdb): mounted filesystem 6cc125b2-fb25-4828-8560-f7d4fd6e4a98 r/w without journal. Quota mode: disabled.
    2026-02-08T21:48:14+0000 debug vminitd: interface=eth0 ipv4Address=192.168.64.2/24 [vminitd] ipAddrAdd
    2026-02-08T21:48:14+0000 debug vminitd: interface=eth0 up=true [vminitd] ipLinkSet
    2026-02-08T21:48:14+0000 debug vminitd: interface=eth0 ipv4Gateway=192.168.64.1 [vminitd] ipRouteAddDefault
    2026-02-08T21:48:14+0000 debug vminitd: domain=test location=/run/container/foo/rootfs nameservers=["192.168.64.1"] options=[] searchDomains=[] [vminitd] configureDns
    2026-02-08T21:48:14+0000 debug vminitd: [vminitd] writing to path /run/container/foo/rootfs/etc/resolv.conf nameserver 192.168.64.1
    domain test
    
    2026-02-08T21:48:14+0000 debug vminitd: path=/run/container/foo/rootfs/etc/resolv.conf [vminitd] wrote resolver configuration
    2026-02-08T21:48:14+0000 debug vminitd: location=/run/container/foo/rootfs [vminitd] configureHosts
    2026-02-08T21:48:14+0000 debug vminitd: path=/run/container/foo/rootfs/etc/hosts [vminitd] wrote /etc/hosts configuration
    2026-02-08T21:48:14+0000 debug vminitd: containerID=foo id=foo stderr=Port: 0 stdin=Port: 268435456 stdout=Port: 268435457 [vminitd] createProcess
    2026-02-08T21:48:14+0000 debug vminitd: [vminitd] created bundle with spec Spec(version: "", hooks: nil, ..., personality: nil)))
    2026-02-08T21:48:14+0000 info vminitd: mountpoint=/sys/fs/cgroup path=/sys/fs/cgroup/container/foo [Cgroup] creating cgroup manager
    2026-02-08T21:48:14+0000 info vminitd: id=foo [vminitd] setting up terminal I/O
    2026-02-08T21:48:14+0000 info vminitd: id=foo [vminitd] starting I/O
    2026-02-08T21:48:14+0000 info vminitd: [vminitd] created vmexec init process
    2026-02-08T21:48:14+0000 debug vminitd: containerID=foo id=foo [vminitd] startProcess
    2026-02-08T21:48:14+0000 debug vminitd: [vminitd] in supervisor lock to start process
    2026-02-08T21:48:14+0000 info vminitd: id=foo [vminitd] starting managed process
    2026-02-08T21:48:14+0000 warning vminitd: current_bytes=78622720 high_events_total=4 threshold_bytes=78643200 [vminitd] vminitd memory threshold exceeded
    2026-02-08T21:48:14+0000 warning vminitd: current_bytes=78524416 high_events_total=56 threshold_bytes=78643200 [vminitd] vminitd memory threshold exceeded
    2026-02-08T21:48:14+0000 warning vminitd: current_bytes=78503936 high_events_total=109 threshold_bytes=78643200 [vminitd] vminitd memory threshold exceeded
    2026-02-08T21:48:14+0000 info vminitd: id=foo pid=108 [vminitd] got back pid data
    2026-02-08T21:48:14+0000 info vminitd: id=foo pid=108 [vminitd] sending pid acknowledgement
    2026-02-08T21:48:14+0000 info vminitd: id=foo [vminitd] wait for PTY FD
    2026-02-08T21:48:14+0000 debug vminitd: [vminitd] received SIGCHLD, reaping processes
    2026-02-08T21:48:14+0000 debug vminitd: [vminitd] finished wait4 of 1 processes
    2026-02-08T21:48:14+0000 debug vminitd: exits=[107: 0] processes=1 [vminitd] checking for exit of managed process
    2026-02-08T21:48:14+0000 info vminitd: id=foo [vminitd] received PTY FD from container, attaching
    2026-02-08T21:48:14+0000 info vminitd: id=foo [vminitd] setting up relay for TerminalIO stdin
    2026-02-08T21:48:14+0000 info vminitd: id=foo [vminitd] setting up relay for TerminalIO stdout
    2026-02-08T21:48:14+0000 info vminitd: id=foo pid=108 [vminitd] started managed process
    2026-02-08T21:48:14+0000 debug vminitd: containerID=foo id=foo [vminitd] waitProcess
    2026-02-08T21:48:14+0000 debug vminitd: containerID=foo id=foo [vminitd] resizeProcess
    2026-02-08T21:48:15+0000 info vminitd: iteration=2 [vminitd] requesting router advertisement
    2026-02-08T21:48:15+0000 error vminitd: error=could not send ICMP packet, errno = 99 [vminitd] failed to receive router advertisement
    2026-02-08T21:48:16+0000 info vminitd: iteration=3 [vminitd] requesting router advertisement
    2026-02-08T21:48:18+0000 info vminitd: [vminitd] currentHopLimit: 64
    2026-02-08T21:48:18+0000 info vminitd: [vminitd] managedFlag: false
    2026-02-08T21:48:18+0000 info vminitd: [vminitd] otherFlag: true
    2026-02-08T21:48:18+0000 info vminitd: [vminitd] routerLifetime: 9000
    2026-02-08T21:48:18+0000 info vminitd: [vminitd] reachableTime: 0
    2026-02-08T21:48:18+0000 info vminitd: [vminitd] retransTimer: 0
    2026-02-08T21:48:18+0000 info vminitd: [vminitd] options:
    2026-02-08T21:48:18+0000 info vminitd: [vminitd]   sourceLinkLayerAddress:
    2026-02-08T21:48:18+0000 info vminitd: [vminitd]     mac: 62:3e:5f:94:4e:65
    2026-02-08T21:48:18+0000 info vminitd: [vminitd]   mtu:
    2026-02-08T21:48:18+0000 info vminitd: [vminitd]     bytes: 1390
    2026-02-08T21:48:18+0000 info vminitd: [vminitd]   prefixInformation
    2026-02-08T21:48:18+0000 info vminitd: [vminitd]     prefix: fd97:7b15:d62e:75ac::/64
    2026-02-08T21:48:18+0000 info vminitd: [vminitd]       onLink: true
    2026-02-08T21:48:18+0000 info vminitd: [vminitd]       autonomous: true
    2026-02-08T21:48:18+0000 info vminitd: [vminitd]       validLifetime: 2592000s
    2026-02-08T21:48:18+0000 info vminitd: [vminitd]       preferredLifetime: 604800s
    2026-02-08T21:48:18+0000 info vminitd: [vminitd]   recursiveDNSServer
    2026-02-08T21:48:18+0000 info vminitd: [vminitd]     lifetime: 270s
    2026-02-08T21:48:18+0000 info vminitd: [vminitd]     addresses:
    2026-02-08T21:48:18+0000 info vminitd: [vminitd]       ipv6: fe80::603e:5fff:fe94:4e65
  9. modified the milestones: 2026-02, 2026-03 on Feb 20, 2026
  10. added a commit that references this issue on Mar 14, 2026
    85d13dd
  11. modified the milestones: 2026-03, 2026-04 on Mar 18, 2026
  12. removed this from the 2026-04 milestone on Apr 1, 2026
  13. removed
    next
    on Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions