-
-
Notifications
You must be signed in to change notification settings - Fork 177
feat: Add check and warning for reboot inhibitor #600
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughAdds two new facts, Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🔇 Additional comments (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
8dd264c to
e2bdca4
Compare
|
If you want to test the new code with an inhibitor in place you can run |
e2bdca4 to
bd03859
Compare
bd03859 to
f72a07d
Compare
In the event that there is some systemd inhibitor in place, the use of
2>&1from commit 4d55f9e (#577), hides the error: 'Call to Reboot failed: Access
denied'. To address that, I've added a check for inhibitors and a more explicit
warning.
In the event of an inhibitor being present, the new output is:
If
--debugis in use, then it will also print the full list of inhibitorsfrom
systemd-inhibit --list, for example:We could consider a new option that lets you to force
systemctl reboot -itoignore inhibitors during reboot, but I haven't included that for now. Also I
don't bother exiting if an inhibitor is detected because we don't know for
certain atm the inhibitor runs long enough to actually stop the subsequent
reboot, so seems worth trying.
On example where there might be an inhibitor is if you are installing a raid
array using mdadm it can automatically trigger a multi-hour (dependent on disk
size) scan after initial configuration of the by disko.