From c7d9781ef8820b9f8fcb7656dae7b6c77215d75d Mon Sep 17 00:00:00 2001 From: unitexe Date: Thu, 17 Sep 2026 23:25:58 -0500 Subject: Fix rootless podman prometheus exporter - Exporter runs as nobody, the rootless podman socket belongs to svc and only svc can use it - The podman library inside the exporter decides its rootless by looking for per-user config in $HOME/.config - $HOME inside the image is /home and /home/.config doesn't exist and the library treats a missing config directory as fatal error - The config directory being mounted has to belong to the user reading it Ironically, the directory stays empty and nothing ever reads from it. The mount gets the exporter past a startup check that assumes its running on a normal host, not in a minimal busybox container. --- .../files/prometheus-podman-exporter.container | 1 + 1 file changed, 1 insertion(+) (limited to 'meta-unit-virtualization/recipes-containers/prometheus-podman-exporter-rootless/files/prometheus-podman-exporter.container') diff --git a/meta-unit-virtualization/recipes-containers/prometheus-podman-exporter-rootless/files/prometheus-podman-exporter.container b/meta-unit-virtualization/recipes-containers/prometheus-podman-exporter-rootless/files/prometheus-podman-exporter.container index 0cdfb0b..bc94095 100644 --- a/meta-unit-virtualization/recipes-containers/prometheus-podman-exporter-rootless/files/prometheus-podman-exporter.container +++ b/meta-unit-virtualization/recipes-containers/prometheus-podman-exporter-rootless/files/prometheus-podman-exporter.container @@ -11,6 +11,7 @@ Volume=%t/podman/podman.sock:/run/podman/podman.sock:ro Environment=CONTAINER_HOST=unix:///run/podman/podman.sock PodmanArgs=--userns=keep-id:uid=65534 Exec=--collector.enable-all +Mount=type=tmpfs,destination=/home/.config,tmpfs-mode=0700,chown [Service] Restart=on-failure -- cgit v1.2.3