feat(container-engine): reach rootful Podman like Docker (NetOrk/netork#818) #123

Merged
christianmanivong merged 1 commits from feature/podman-engine-netork-818 into main 2026-11-17 03:54:10 +00:00
Owner

Prio: P3 -- part of NetOrk/netork#818 (Podman runtime driver), which epic NetOrk/netork#2572 raised to P3: Podman is the default engine on the fleet's EL hosts.

What changes

  • ENGINES gains podman with the API podman-libpod. open_container_engine("podman") reaches it with podman system dial-stdio, which Podman has since 4.0.0 (containers/podman 6f9e9ee, first released in v4.0.0; absent from 3.4.x).
  • Rootful Podman, as root. The engine netOrk reads is the host's rootful Podman: the system's containers, Quadlet's units (/etc/containers/systemd), the API socket podman.socket serves at /run/podman/podman.sock. Rootless containers live in the storage of the user who runs them and no other login sees them. So the connection runs every call as root: ROOT_ENGINES, ContainerEngineConnection.privileged, passed to open_stream, run_cli and stream_cli.
  • An engine is listed when its CLI names itself on --version (command -v <bin> >/dev/null 2>&1 && <bin> --version). podman-docker installs a docker that is podman; listed as Docker it would be read a second time, as the login user's rootless Podman.

Tests

tests/test_container_engine.py: Podman listed with its API, both engines on one host, podman-docker's docker left out, the API stream and the CLI privileged. Full suite: 1717 passed, 3 skipped.

Order

Merge this before NAPALM/napalm-linux's PR of the same branch name (its test reaches Podman through this package; its CI installs this package from main). netOrk's branch feature/podman-runtime-818 pins this branch's commit until then; the pin moves to the merged commit afterwards.

Prio: P3 -- part of NetOrk/netork#818 (Podman runtime driver), which epic NetOrk/netork#2572 raised to P3: Podman is the default engine on the fleet's EL hosts. ## What changes - `ENGINES` gains `podman` with the API `podman-libpod`. `open_container_engine("podman")` reaches it with `podman system dial-stdio`, which Podman has since 4.0.0 (containers/podman 6f9e9ee, first released in v4.0.0; absent from 3.4.x). - **Rootful Podman, as root.** The engine netOrk reads is the host's rootful Podman: the system's containers, Quadlet's units (`/etc/containers/systemd`), the API socket `podman.socket` serves at `/run/podman/podman.sock`. Rootless containers live in the storage of the user who runs them and no other login sees them. So the connection runs every call as root: `ROOT_ENGINES`, `ContainerEngineConnection.privileged`, passed to `open_stream`, `run_cli` and `stream_cli`. - **An engine is listed when its CLI names itself on `--version`** (`command -v <bin> >/dev/null 2>&1 && <bin> --version`). podman-docker installs a `docker` that is podman; listed as Docker it would be read a second time, as the login user's rootless Podman. ## Tests `tests/test_container_engine.py`: Podman listed with its API, both engines on one host, podman-docker's `docker` left out, the API stream and the CLI privileged. Full suite: 1717 passed, 3 skipped. ## Order Merge this before NAPALM/napalm-linux's PR of the same branch name (its test reaches Podman through this package; its CI installs this package from main). netOrk's branch `feature/podman-runtime-818` pins this branch's commit until then; the pin moves to the merged commit afterwards.
christianmanivong added 1 commit 2026-11-16 22:34:01 +00:00
feat(container-engine): reach rootful Podman like Docker (NetOrk/netork#818)
driver / lint (pull_request) Successful in 16s
driver / standard (pull_request) Successful in 19s
driver / types (pull_request) Successful in 55s
driver / test (3.13) (pull_request) Successful in 1m5s
driver / test (3.12) (pull_request) Successful in 1m13s
driver / lowest (pull_request) Successful in 37s
driver / build (pull_request) Successful in 29s
driver / security (pull_request) Successful in 1m2s
CI / driver (pull_request) Successful in 2m27s
driver / publish (pull_request) Skipped
7051199589
container_engines() lists Podman with the API podman-libpod, and
open_container_engine("podman") reaches it with podman system dial-stdio
(Podman 4.0 and later). It is the host's rootful Podman: the engine of the
system's containers and of Quadlet's units, whose socket is root's. So the
connection runs every call as root (ContainerEngineConnection.privileged).

An engine is listed only when its CLI names itself on --version:
podman-docker's docker is podman, and listing it as Docker would read the
login user's rootless Podman a second time.
christianmanivong merged commit f1940aa918 into main 2026-11-17 03:54:10 +00:00
christianmanivong deleted branch feature/podman-engine-netork-818 2026-11-17 03:54:10 +00:00
Sign in to join this conversation.