extended attributes in a container #3663
Replies: 3 comments 2 replies
-
Do you see the same issue when using ext4 as the underlying filesystem? XFS has some weird edge cases when used with overlayfs, especially on older kernels. |
Beta Was this translation helpful? Give feedback.
-
@bpopovich44 - do they run the command really against files in the container / in the image and not against a volume (persistent volume / emptyDir…) - it should be container best practice not to write into the containers filesystem and use persistent volumes for that. |
Beta Was this translation helpful? Give feedback.
-
I wanted to post my findings here for anyone else with this issue. xattr wouldn't work because, even though selinux was in permissive on the worker nodes, inside the container, if you run the ls -Z command you can see selinux context labels are still applied to the files. These context labels wont let you use extended attributes on container folders. If you set selinux to disabled in the selinux config on the worker nodes,then these context labels dont persist into the containers and extended attributes works. You can leave selinux enabled on the master nodes. |
Beta Was this translation helpful? Give feedback.
-
My dev team is launching containers that need to use xattr with cp. The command specifically is cp -afl --preserve=xattr. The host system is a XFS file system and the cp command works fine there. Inside a container, the cp command works but only for files. I get 'Operation not supported when the command is used against directories within the container. I've been searching for days and cannot find a solution. Why is this working on files but not directories.
Any help is appreciated. Thank you
Beta Was this translation helpful? Give feedback.
All reactions