srl-labs / containerlab

container-based networking labs
https://containerlab.dev
BSD 3-Clause "New" or "Revised" License
1.48k stars 251 forks source link

ghcr.io/srl-labs/clab fails on Podman #2198

Open ankudinov opened 2 hours ago

ankudinov commented 2 hours ago
docker run --rm -it --privileged \
  --network host \
  -v /var/run/docker.sock:/var/run/docker.sock \
  --pid="host" \
  -w $(pwd) \
  -v $(pwd):$(pwd) \
  ghcr.io/srl-labs/clab bash

Once started this way clab deploy works perfectly with the following clab topology:

---
name: test
prefix: ""

mgmt:
  ipv4-subnet: 10.0.0.0/16

topology:
  kinds:
    ceos:
      image: arista/ceos:latest
  defaults:
    kind: ceos
  nodes:
    ar01:
      mgmt-ipv4: 10.0.1.1
    ar02:
      mgmt-ipv4: 10.0.1.2

  links:
    - endpoints: ["ar01:eth1_1", "ar02:eth1_1"]

However when replaced with podman run it fails with:

INFO[0000] Containerlab v0.57.2 started
INFO[0000] Parsing & checking topology file: topology.clab.yml
WARN[0000] failed gleaning v4 and/or v6 addresses from bridge via netlink, falling back to docker network inspect data
Error: failed to lookup link "br-2f72e818ccc3": Link not found

Curious if anyone have seen this before and found any solution? I might dig into that myself later, however usually I run cLab on our own devcontainer images and this works just fine. As it works via VSCode, there should be some knob in place...

This is rootful podman with Docker compatibility enabled:

 ls -la /var/run | grep docker
lrwxr-xr-x   1 root         daemon          60 Sep 20 14:07 docker.sock -> /Users/pa/.local/share/containers/podman/machine/podman.sock

PS: this is on ARM MacBook =wink=

ankudinov commented 2 hours ago

Feel free to re-classify as discussion or close due to no official Podman support. However Podman is much better in 2024 and it works if not executed in clab container. So, probably feasible to investigate.