-
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
files: selinux relabel takes a long time when re-using /home partition #1228
Comments
We might need a specific option in Ignition to say "do not relabel the content from this partition". |
@travier WDYT of the above suggestion? |
I think we have to relabel everything by default otherwise we could get issues with inconsistent labels from a previous installation. Potentially even security issues although I do not have an example at hand. Thus if you explicitly decide to not relabel then you're on your own. |
Hmm. Are you saying that we're doing a relabel of |
Good point, I'm not exactly sure about what's triggering the full relabel here and what we effectively intend for re-used partitions. |
Hi there, after a discussion with a SELinux developer, we got the following feedback: flatcar/Flatcar#673 (comment) - which made me think to this current issue. That would be interesting to investigate on the following suggestion on - cmd := exec.Command(distro.SetfilesCmd(), "-vF0", "-r", ut.DestDir, file_contexts, "-f", "-")
+ cmd := exec.Command(distro.SetfilesCmd(), "-DvF0", "-r", ut.DestDir, file_contexts, "-f", "-") to see if it reduces the relabeling time. |
Bug
If I re-use a partition/filesystem for
/home/
then the selinux relabel can take a significant amount of time. I suspect that we're relabeling all of the files from the re-used partition and we should probably try to narrow our scope to just files we've touched in Ignition.Operating System Version
It's a dev build of FCOS since we don't have official aarch64 ones yet.
Ignition Version
Environment
Raspberry Pi 4 (B)
Expected Behavior
Quick relabel during startup.
Actual Behavior
Takes more than 2 minutes for the relabel to happen:
Reproduction Steps
Use Ignition config with separate
/home/
. Here is an example Butane config:Install a system place a bunch of files in your home dir. For me I did some rootless podman COSA builds and the contents of my home were about 30G:
Now re-install with the same Ignition config. Notice the relabel takes much more time.
The text was updated successfully, but these errors were encountered: