-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't try to relabel mountpoints which already exist #1452
Comments
Ignition should only be trying to relabel files it wrote. Do you know why it's trying to relabel |
@jlebon thanks for your answer. I checked, the issue comes from this configuration: storage:
filesystems:
- name: oem
mount:
device: "/dev/disk/by-label/OEM"
format: "btrfs"
files:
- path: /grub.cfg
filesystem: oem
mode: 0644
contents:
inline: |
set linux_append="flatcar.autologin" I also forgot to share the full log:
It appears in the |
The return value of As a workaround, the Ignition config can specify that the OEM partition should be mounted somewhere else [1]. That only affects the Ignition run and won't affect the installed system at all. But yes, we should fix this. [1] ...in Ignition spec 3.x syntax. The config you posted uses Ignition spec 2.x. |
Now when file systems are being mounted ignition will relabel directories if they did not exist previously. Whereas before file systems could be relabelled if they did/didnt exist previously Fix coreos#1452
This PR introduces a new change to how ignition mounts filesystems, Now when file systems are being mounted ignition will relabel directories if they did not exist previously. Whereas before file systems could be relabelled if they did/didnt exist previously Fix coreos#1452
…ectory even if it previously existed. This isn't necessary, and fails if the mountpoint is on a read-only filesystem, such as /usr/share/oem on Flatcar. Relabel the mountpoint only if we create it. Fixes: coreos#1452
When mounting filesystems, Ignition was relabeling the mountpoint directory even if it previously existed. This isn't necessary, and fails if the mountpoint is on a read-only filesystem, such as /usr/share/oem on Flatcar. Relabel the mountpoint only if we create it. Fixes: coreos#1452
Bug
Hi, we're working to get Flatcar fully labelled from SELinux point of view. We're currently hitting an issue when a file created by Ignition needs to be relabeled (
/etc/docker/daemon.json
).A Flatcar contributor tried back in the days to enable the
sefiles
feature for Ignition: flatcar-archive/coreos-overlay#1784 (withselinuxRelabel
) but we were hitting some relabeling issue with read-only filesystems (likeOEM
partition).Operating System Version
Flatcar
Ignition Version
2.14.0
Expected Behavior
Skip read-only filesystems.
Actual Behavior
Additional Information
What do you think about implementing an extra-check
util.FileSystemIsReadOnly(path)
before calling theRelabelFiles
function ?The text was updated successfully, but these errors were encountered: