Description
Issue Description
At GNOME we run a set of gitlab-runners runners that support the Project's CI/CD needs, since the upgrade to Fedora 42 (this was working fine with Fedora 40) there seems to be a race condition that causes:
ERROR: Preparation failed: creating cache volume: set volume permissions: running permission container "c7309ea6d35f49a8d68ba660c62b676929b5744844bffd75151c664ea8fe1a28" for volume "runner-qy9jf-zq7-project-9004-concurrent-1-8c5c3832aa81ed63-cache-c33bcaa1fd2c77edfc3893b41966cea8": starting permission container: Error response from daemon: rootless netns: mount resolv.conf to "/run/user/991/containers/networks/rootless-netns/run/systemd/resolve/stub-resolv.conf": no such file or directory (linux_set.go:105:0s)
On top of this any container started from the podman user systemd session doesn't seem to create a persistent /run/user/$uid/containers/networks/rootless-netns directory structure, every container that is started as a build creates a brand new rootless-netns directory and associated files (i.e resolv.conf) which then gets deleted once the build has finished. This however sometimes leave the rootless-netns directory in an inconsistent state which then prevents the subsequent build to succeed due to the error above. Generally manually running "rm -rf /run/user/$uid/containers/networks/rootless-netns" temporarily fixes the issue.
Steps to reproduce the issue
Steps to reproduce the issue
- Set up your system via https://github.com/gnome-infra/ansible/blob/master/roles/gitlab-runner/tasks/main.yml
- Trigger new container creation via GitLab CI/CD
- At some point the container creation process will fail with a similar error as "ERROR: Preparation failed: creating cache volume: set volume permissions: running permission container "c7309ea6d35f49a8d68ba660c62b676929b5744844bffd75151c664ea8fe1a28" for volume "runner-qy9jf-zq7-project-9004-concurrent-1-8c5c3832aa81ed63-cache-c33bcaa1fd2c77edfc3893b41966cea8": starting permission container: Error response from daemon: rootless netns: mount resolv.conf to "/run/user/991/containers/networks/rootless-netns/run/systemd/resolve/stub-resolv.conf": no such file or directory (linux_set.go:105:0s)"
Describe the results you received
Starting a new build fails with "ERROR: Preparation failed: creating cache volume: set volume permissions: running permission container "c7309ea6d35f49a8d68ba660c62b676929b5744844bffd75151c664ea8fe1a28" for volume "runner-qy9jf-zq7-project-9004-concurrent-1-8c5c3832aa81ed63-cache-c33bcaa1fd2c77edfc3893b41966cea8": starting permission container: Error response from daemon: rootless netns: mount resolv.conf to "/run/user/991/containers/networks/rootless-netns/run/systemd/resolve/stub-resolv.conf": no such file or directory (linux_set.go:105:0s)"
Describe the results you expected
A successful container creation
podman info output
host:
arch: amd64
buildahVersion: 1.39.4
cgroupControllers:
- cpu
- memory
- pids
cgroupManager: systemd
cgroupVersion: v2
conmon:
package: conmon-2.1.13-1.fc42.x86_64
path: /usr/bin/conmon
version: 'conmon version 2.1.13, commit: '
cpuUtilization:
idlePercent: 96.15
systemPercent: 0.75
userPercent: 3.11
cpus: 20
databaseBackend: sqlite
distribution:
distribution: fedora
version: "42"
eventLogger: file
freeLocks: 2042
hostname: hetzner-1
idMappings:
gidmap:
- container_id: 0
host_id: 991
size: 1
- container_id: 1
host_id: 524288
size: 1100000000
uidmap:
- container_id: 0
host_id: 991
size: 1
- container_id: 1
host_id: 524288
size: 1100000000
kernel: 6.14.5-300.fc42.x86_64
linkmode: dynamic
logDriver: journald
memFree: 22063742976
memTotal: 67208761344
networkBackend: netavark
networkBackendInfo:
backend: netavark
dns:
package: aardvark-dns-1.14.0-1.fc42.x86_64
path: /usr/libexec/podman/aardvark-dns
version: aardvark-dns 1.14.0
package: netavark-1.14.1-1.fc42.x86_64
path: /usr/libexec/podman/netavark
version: netavark 1.14.1
ociRuntime:
name: crun
package: crun-1.21-1.fc42.x86_64
path: /usr/bin/crun
version: |-
crun version 1.21
commit: 10269840aa07fb7e6b7e1acff6198692d8ff5c88
rundir: /run/user/991/crun
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
os: linux
pasta:
executable: /usr/bin/pasta
package: passt-0^20250503.g587980c-1.fc42.x86_64
version: ""
remoteSocket:
exists: true
path: /run/user/991/podman/podman.sock
rootlessNetworkCmd: pasta
security:
apparmorEnabled: false
capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
rootless: true
seccompEnabled: true
seccompProfilePath: /usr/share/containers/seccomp.json
selinuxEnabled: true
serviceIsRemote: false
slirp4netns:
executable: /usr/bin/slirp4netns
package: slirp4netns-1.3.1-2.fc42.x86_64
version: |-
slirp4netns version 1.3.1
commit: e5e368c4f5db6ae75c2fce786e31eef9da6bf236
libslirp: 4.8.0
SLIRP_CONFIG_VERSION_MAX: 5
libseccomp: 2.5.5
swapFree: 8588943360
swapTotal: 8589930496
uptime: 70h 10m 48.00s (Approximately 2.92 days)
variant: ""
plugins:
authorization: null
log:
- k8s-file
- none
- passthrough
- journald
network:
- bridge
- macvlan
- ipvlan
volume:
- local
registries:
search:
- registry.fedoraproject.org
- registry.access.redhat.com
- docker.io
store:
configFile: /home/podman/.config/containers/storage.conf
containerStore:
number: 0
paused: 0
running: 0
stopped: 0
graphDriverName: overlay
graphOptions: {}
graphRoot: /home/podman/.local/share/containers/storage
graphRootAllocated: 944913514496
graphRootUsed: 779810328576
graphStatus:
Backing Filesystem: xfs
Native Overlay Diff: "true"
Supports d_type: "true"
Supports shifting: "false"
Supports volatile: "true"
Using metacopy: "false"
imageCopyTmpDir: /var/tmp
imageStore:
number: 492
runRoot: /run/user/991/containers
transientStore: false
volumePath: /home/podman/.local/share/containers/storage/volumes
version:
APIVersion: 5.4.2
BuildOrigin: Fedora Project
Built: 1743552000
BuiltTime: Wed Apr 2 00:00:00 2025
GitCommit: be85287fcf4590961614ee37be65eeb315e5d9ff
GoVersion: go1.24.1
Os: linux
OsArch: linux/amd64
Version: 5.4.2
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
On premise bare metal podman installation, containers are initialized via the gitlab-runner service:
[podman@hetzner-1 ~]$ cat .config/systemd/user/default.target.wants/gitlab-runner.service
[Unit]
Description=GitLab Runner
Documentation=man:podman-generate-systemd(1)
Wants=network-online.target
After=network-online.target
RequiresMountsFor=/run/user/991/containers
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=always
TimeoutStopSec=70
ExecStartPre=-rm -f /run/user/991/%n.ctr-id
ExecStart=/usr/bin/podman
--url unix:/run/user/991/podman/podman.sock container run
--cidfile=/run/user/991/%n.ctr-id
--cgroups=no-conmon
--rm
--attach STDOUT
--attach STDERR
--sdnotify=conmon
--replace
--name gitlab-runner
--volume /run/user/991/podman/podman.sock:/var/run/docker.sock:z
--volume /home/podman/gitlab-runner:/etc/gitlab-runner:Z
--label io.containers.autoupdate=image
--label org.gnome.pydocuum.skip=True registry.gitlab.com/gitlab-org/gitlab-runner:latest
ExecStop=/usr/bin/podman stop
--ignore -t 10
--cidfile=/run/user/991/%n.ctr-id
ExecStopPost=/usr/bin/podman rm
-f
--ignore -t 10
--cidfile=/run/user/991/%n.ctr-id
NotifyAccess=all
[Install]
WantedBy=default.target
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting