-
I'm running into a strange issue when running rootless podman nested in another (rootful) container regarding selinux, but there's so many pieces in play, I'm not certain if its a bug in podman or something else, or even how to figure that out. Any advice as to where to start looking would be appreciated. SymptomsWhen running podman in an affected configuration, building an image results in errors like this:
When this occurs, denials similar to the following appear in the selinux audit logs:
My experience with selinux is admittedly limited, but to my understanding "unlabeled_t" either means "this was made on a non-selinux kernel" or "selinux has failed in some capacity". To my best understanding, podman is somehow managing to create a file without a valid selinux label (should this even be possible?) and then fails to delete it. Tested ConfigurationsThis issue can be reproduced 100% of the time on a fresh oracle linux 8.10 VM (kernel version 5.15) running rke2 v1.32 (containerd v1.7.27), but works 100% of the time on a fedora 42 VM running the same rke2. However, it works 100% of the time on the same OL8 VM running rke1 v1.8.6 (docker v28.1.1) . I think rules out an issue purely in kernel version, (outer) container runtime, or distro-provided selinux policy set. Podman v5.6.0 and v5.4.0 were tested and produce the same results as one-another, so its not a regression. Reproduction StepsTo demonstrate, run the following in the cluster in question.
To install RKE1 curl -fL https://download.docker.com/linux/static/stable/x86_64/docker-28.1.1.tgz | tar xz --strip-components=1 -C /usr/bin/
systemd-run --unit=docker /usr/bin/dockerd
curl -fL -o /usr/bin/rke https://github.com/rancher/rke/releases/download/v1.8.6/rke_linux-amd64
chmod +x /usr/bin/rke
cat > cluster.yml <<'EOF'
kubernetes_version: v1.30.14-rancher1-1
nodes:
- address: !!ip_address_goes_here!!
user: root
role:
- controlplane
- etcd
- worker
EOF
rke up To install RKE2 curl -sfL https://get.rke2.io | sh -
# not enabled on fedora
systemctl stop firewalld || true
systemctl start rke2-server
command cp -vrf /var/lib/rancher/rke2/bin/kubectl /usr/bin/kubectl
command cp -vrf /var/lib/rancher/rke2/bin/ctr /usr/bin/ctr
mkdir -vp /home/podman/.kube
command cp -vrf /etc/rancher/rke2/rke2.yaml /home/podman/.kube/config
chown -vR 1000:1000 /home/podman/.kube |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If you're running all of this on top of xfs, then it could be https://lore.kernel.org/linux-xfs/[email protected]/, which was merged upstream in 5.20. |
Beta Was this translation helpful? Give feedback.
If you're running all of this on top of xfs, then it could be https://lore.kernel.org/linux-xfs/[email protected]/, which was merged upstream in 5.20.