Hey folks,
I just tried upgrading my Dagger playground to v0.11.7 and ran into an interesting issue with dagger init hanging indefinitely:
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5fe9bffc797e registry.dagger.io/engine:v0.11.7 "dagger-entrypoint.sโฆ" 17 seconds ago Restarting (1) 2 seconds ago
A brief investigation showed that the engine container is in a crash loop because the iptables command fails:
...
dnsmasq[35]: using nameserver 1.1.1.1#53
dnsmasq[35]: using only locally-known addresses for dagger.local
dnsmasq[35]: read /etc/hosts - 18 names
dnsmasq[35]: read /var/run/containers/cni/dnsname/dagger/addnhosts - 0 names
time="2024-06-15T14:00:52Z" level=info msg="auto snapshotter: using overlayfs"
time="2024-06-15T14:00:52Z" level=warning msg="failed to release network namespace \"akq0o8xxuugnzhyux411vqg56\" left over from previous run: plugin type=\"loopback\" failed (delete): unknown FS magic on \"/var/lib/dagger/net/cni/akq0o8xxuugnzhyux411vqg56\": ef53"
time="2024-06-15T14:00:52Z" level=debug msg="shutting down otel pub/sub"
time="2024-06-15T14:00:52Z" level=debug msg="shutting down otel pub/sub"
buildkitd: failed to create worker: failed to create network providers: CNI setup error: plugin type="bridge" failed (add): running [/sbin/iptables -t nat -A POSTROUTING -s 10.87.0.11 -j CNI-fb0ef6dbec94aecf623cd11e -m comment --comment name: "dagger" id: "eeyq02izuj1a98shgcga38wwo" --wait]: exit status 4: iptables v1.8.10 (nf_tables): CHAIN_ADD failed (Not supported): chain POSTROUTING
The host is freshly upgraded Ubuntu 22.04 with iptables in the legacy mode (and a custom kernel build ๐ ):
$ iptables --version
iptables v1.8.7 (legacy)
You can easily repro it here https://labs.iximiuz.com/playgrounds/dagger - just upgrade the currently installed v0.11.6 to the latest v0.11.7.