Repository navigation
Open
Labels
source: vivariumConcerns the vivarium source
Description
The uplink is now fixed at 10.0.2.15/24, router 10.0.2.2, DNS 10.0.2.3 -- constants in uplink_args in pkgs/uml-runner/uml_runner/forward.py, passed to passt by both backends. That replaced passt's default of handing the guest the host's own public address (#5), and the fixed range is right for almost every test. It should not be the only option.
What should be configurable
- The IPv4 subnet.
10.0.2.0/24is QEMU's convention and a reader knows it, but it is also a range a host may already be using -- a VPN, a container bridge, another hypervisor. A guest that routes for real then has two meanings for the same address. This already bit the segment side once:tests/k8s.pyuses10.100.0.xand this host has WireGuard on10.100.0.1/24, which is whyk8s-pullwas given10.104. - IPv6. passt currently assigns the guest an address out of the host's prefix, which is left alone because it is the normal way to do IPv6 -- but it has the same "depends on where the host is" property as the old IPv4 behaviour. A test that wants a stable ULA should be able to say so.
- Dual-stack, v4-only and v6-only. passt takes
-4/-6to restrict itself. A test of something that has to work without IPv4, or without IPv6, cannot ask for that today. This is the one with real test value: a single-stack cluster is a different cluster.
Two ways in, and they should agree
- Nix, as options on the guest, so a test declares it the way it declares everything else -- probably
boot.uml.uplink.{address,prefixLength,gateway,dns,stack}alongsideboot.uml.lan. This is the one that belongs in a committed test. - An environment variable, for changing it without editing Nix, the way
NIXKUBE_UML_SCENARIOSworks. The case is a host whose network collides with the default: somebody should be able to run the existing suite with a different range and no patch. Something likeUML_UPLINK_SUBNET=172.31.0.0/24.
The env var wins over the Nix value when both are set, and the runner should say on the console when it is overriding, the same way it already announces a remapped privileged port.
What to check while doing it
--map-host-loopbackfollows the gateway today (passt reportsNAT to host 127.0.0.1: 10.0.2.2). A configurable gateway has to keep that working, or a guest loses its route back to host services.forward.py's inbound rules are on the host's127.0.0.xand should be unaffected, but a v6-only guest has no IPv4 for passt to forward to -- so the forwarding path needs a look before claiming v6-only works.modules/k8s.nixreadsboot.uml.lan.addressfor--node-ipand says in a comment that the uplink is10.0.2.x. If the uplink becomes configurable that comment becomes a lie again unless it names the option.- Whether two guests may keep sharing one uplink address. They can today because each has its own passt and no shared link; nothing here should change that by accident.
Metadata
Metadata
Assignees
Labels
source: vivariumConcerns the vivarium source
Activity