Skip to content

v0.1.6

Choose a tag to compare

@cr-sbarbouche cr-sbarbouche released this 14 Nov 11:49
e9d8857
  • network="isolated": create_sandbox(network="isolated") puts the sandbox on one shared docker bridge, agvisor-isolated, created with inter-container traffic off. Sandboxes on it keep the internet but can't connect to each other's ports (the connection times out); files were never shared between sandboxes, this is only the network. The default is still "bridge" (docker0), so a host firewall written for docker0 keeps applying to existing setups; isolated sandboxes sit on a new bridge, so give it rules of its own. Docker's embedded DNS doesn't work under gVisor on user-defined networks (no name resolves, not even with --dns), so an isolated sandbox is given the resolver servers a sandbox on "bridge" gets. A network of that name that exists with inter-container traffic on is refused, not used. "isolated" is now a reserved network name
  • Limits(workspace="10g"): a hard cap on the /workspace volume of a named sandbox (the home for gui=True), which disk never covered, so a runaway process could fill the host's disk through it. It is an xfs project quota that docker sets on the volume (docker volume create --opt size=): past the cap writes fail with No space left on device, the sandbox keeps running, and the cap is still there after a stop(). It needs a host whose /var/lib/docker/volumes is on xfs mounted with pquota (setup in the README, Host setup); on any other host create_sandbox raises with docker's message instead of leaving the volume uncapped. The cap belongs to the volume and is fixed when it is created, like owner=: a different cap later, or a cap asked for on a volume made without one, raises ValueError (delete() it first, which erases its files); asking for no cap leaves the one it has. Named sandboxes only, off by default
  • examples/: seven small runnable scripts: quickstart, resuming and snapshots, limits, files and jobs, the egress allowlist, network="isolated" and the /workspace cap. CI runs every one of them against real gVisor, so they can't rot
  • Video: a one-minute walk through the two features, made from the real output of the examples on gVisor (attached: whats-new-0.1.6.mp4)
  • The firewall rule for the cloud metadata endpoint in the README (iptables -I DOCKER-USER -d 169.254.169.254 -j DROP) is now checked in CI against a fake metadata service on the runner (tests/test_gvisor_imds.py): a sandbox on "bridge" reads it, and stops reading it once the rule is in. That is a fake on the CI runner, not a real EC2 or Azure instance
  • CI: a new gvisor job runs every real-runsc test script and the examples on each push and pull request, on the runner's own docker, including test_mcp_stdio.py (agvisor-mcp driven over stdio by the real mcp client). Until now these were only run by hand
  • Tested on real gVisor (runsc 20261026.0, GitHub's Ubuntu 26.04 runner) with tests/test_gvisor_isolated.py and tests/test_gvisor_workspace.py, the cap on a loop-mounted xfs filesystem with pquota. Not tested: isolated or the cap on a real cloud VM, either of them with gui=True, and the /etc/fstab line in the README's xfs setup