Skip to content
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

reexec systemd after installing SELinux packages #620

Closed
wants to merge 1 commit into from

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Nov 26, 2020

Starting systemd 245 the daemon reloads SELinux contexts after a daemon-reload, but prior to that it needs to reexec. Both EL7 and EL8 are too old so this runs reexec. To limit the impact, it only does so if a package change was detected. This can fail if a metapackage (katello) already pulled in all packages but there's no reliable way to detect if a reexec is needed. Always running daemon-reexec can be unexpected.

This is untested and I'm not even sure if my logic is entirely correct.

Starting systemd 245 the daemon reloads SELinux contexts after a
daemon-reload, but prior to that it needs to reexec. Both EL7 and EL8
are too old so this runs reexec. To limit the impact, it only does so if
a package change was detected. This can fail if a metapackage (katello)
already pulled in all packages but there's no reliable way to detect if
a reexec is needed. Always running daemon-reexec can be unexpected.
@ekohl
Copy link
Member Author

ekohl commented Nov 26, 2020

@ehelms this may also explain what you saw with Pulpcore's socket.

@evgeni
Copy link
Member

evgeni commented Nov 26, 2020

tests need updating.

I think this will solve the issue for fresh installs, but not for upgrades, yet I am unsure how to solve it there. %post of foreman-selinux seems rather harsh.

@ekohl
Copy link
Member Author

ekohl commented Nov 26, 2020

We would probably need to do the same thing in %post for pulpcore-selinux then. Still, doesn't sound too bad.

@evgeni
Copy link
Member

evgeni commented Nov 27, 2020

let's try theforeman/foreman-packaging#6052 then

@ekohl ekohl closed this Nov 27, 2020
@ekohl ekohl deleted the systemd-daemon-reexec branch November 27, 2020 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants