You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using local-path-provisioner:v0.0.30 with K3s in selinux enabled mode, creation of PVs yields an additional MLS label on the directory that results in the helperPod unable to delete the directory upon cleanup due to an SELinux source and target mismatch.
I'm running with SELinux in targeted mode. I've verified that it's not the helperPod itself that is adding the additional SELinux label.
Creation of a PV using the helperPod (auto mode) [note the additional c440,c581, which is ephemeral]:
drwxrwxrwx. 2 root root system_u:object_r:container_file_t:s0:c440,c581 6 Mar 12 07:23 pvc-2af9d7b1-78a3-48d4-bf11-c3286608a73a_default_local-path-pvc
My test using a statically created helperPod (manual mode) [I created the directory using the /bin/sh /script/setup ${VOL_DIR}]:
drwxrwxrwx. 2 root root system_u:object_r:container_file_t:s0 6 Mar 12 07:35 test
Environment details:
kubectl get cm -n kube-system local-path-config -o yaml
k3s version v1.30.6+k3s1 (1829eaae)
go version go1.22.8
rpm -qa | grep k3s:
k3s-selinux-1.6-1.el9.noarch
sestatus:
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Memory protection checking: actual (secure)
Max kernel policy version: 33
I've been using the example deployments on local-path-provisioner to test the Pod/PVC creation/deletion and what SELinux labels are getting added to the PV directory.
The text was updated successfully, but these errors were encountered:
pog-charlesinglese
changed the title
LPP fails to cleanup PV due to additional MLS labels on PV directory
LPP fails to cleanup PV due to additional SELinux range labels on PV directory
Mar 13, 2025
When using local-path-provisioner:v0.0.30 with K3s in selinux enabled mode, creation of PVs yields an additional MLS label on the directory that results in the helperPod unable to delete the directory upon cleanup due to an SELinux source and target mismatch.
I'm running with SELinux in targeted mode. I've verified that it's not the helperPod itself that is adding the additional SELinux label.
Creation of a PV using the helperPod (auto mode) [note the additional c440,c581, which is ephemeral]:
My test using a statically created helperPod (manual mode) [I created the directory using the /bin/sh /script/setup ${VOL_DIR}]:
Environment details:
I've been using the example deployments on local-path-provisioner to test the Pod/PVC creation/deletion and what SELinux labels are getting added to the PV directory.
The text was updated successfully, but these errors were encountered: