Skip to content

6. Job + service

6. Job + service

Result: works, on a per-job network. A job container reached the Spanner emulator by name in 0.53 s, both under gVisor with its own network stack (network=sandbox), when the two share a user-defined Podman network. Podman pods don't work with gVisor at all.

Setup (2026-11-22)

  • Service: the emulator image from experiment 5. Job: the uv image from experiment 4, running a Python loop that polls GET http://<service>:9020/v1/projects/p/instances every 100 ms for up to 30 s.
  • Both containers under podman --runtime …/runsc --runtime-flag ignore-cgroups --runtime-flag network=<mode>.
  • Three wirings tried:
  • a user-defined network (podman network create exp6net), job reaches the service by container name;
  • a Podman pod, job reaches the service on localhost, network=sandbox;
  • the same pod with network=host.

Raw results

Wiring Result
User network, network=sandbox 200 after 0.53 s
Pod, infra container under crun never ran: the gVisor-only flag --ignore-cgroups was passed to crun (unrecognized option) — a setup error on my side
Pod, infra container under runsc, network=sandbox FetchSpec failed: reading spec: joining UTS namespace "/proc/…/ns/uts" is not supported
Pod, infra container under runsc, network=host same error

What we learned

  • Job-to-service networking works with gVisor's own network stack on a user-defined network. That keeps the stronger isolation that experiment 5's network=host gave up. It also fits the loopback hypothesis from experiment 5 (traffic arriving on a real interface gets through; traffic forwarded onto loopback didn't), but doesn't prove it.
  • Podman pods are out with runsc. gVisor can't join another container's UTS namespace, so the "everything on localhost" model of a pod isn't available. Services are reached by name, which is what Compose does anyway.
  • Not tested here: what else a job on that network can reach (the LAN, smaug's host ports, other jobs' networks). That's the job network policy ("internet yes, private ranges no") and needs its own experiment.

What it changes

  • One user-defined network per job, created and destroyed by the runner, with services reached by their Compose names. Jobs are then isolated from each other by network as well as by sandbox.
  • "One gVisor sandbox per job holding several containers" (the pod model) is off the table with Podman. A sandbox per container on a shared per-job network replaces it; experiment 5's memory overhead then applies per container, not per job, which makes measuring it properly more urgent.