Bug 982200

Summary: Enable sysrq by default because systemd is not able to reboot in case of emergency
Product: [Fedora] Fedora Reporter: Adam Pribyl <covex>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: iarlyy, jonathan, kvolny, lnykryn, mattdm, notting, plautrba, robatino, rvokal, travneff, vpavlin
Target Milestone: ---Keywords: Regression, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-10 08:18:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adam Pribyl 2013-07-08 11:37:18 UTC
Description of problem:

As systemd depends on many files on a rootfs, in case of any problems with rootfs, it is not able to do its basic function - control processes and (cleanly) shutdown/reboot when crtl-alt-del is pressed on local keyboard.

As this is a feature, I'd like to ask to enable the sysrq by default on Fedora, otherwise it is not possible to reboot system even localy in case of emergency situation.

Reference "notabug" on systemd:
https://bugzilla.redhat.com/show_bug.cgi?id=981877

Comment 1 Václav Pavlín 2013-07-08 12:35:21 UTC
You don't have to wait until your system is almost dead - you can enable it right after instalation. SysRq is not meant to be used by basic users, thus should not be enabled by default.

Comment 2 Karel Volný 2013-07-09 10:35:21 UTC
(In reply to Václav Pavlín from comment #1)
> You don't have to wait until your system is almost dead - you can enable it
> right after instalation. SysRq is not meant to be used by basic users, thus
> should not be enabled by default.

so, you suggest people should use hardware switch rather than shutting down in the most clean way possible ATM?

Ctrl+Alt+Del has worked in the past

now that doesn't work

this is a regression

if a decision was made to disable Ctrl+Alt+Del in favour of SysRq, well ... okay, admins can live with that, no big deal

if this is not the case, and Ctrl+Alt+Del should work, feel free to close this as duplicate of bug #981877 and reopen that one - but please, resolve this directly with those saying we should use SysRq, do not send users from one component to another forth and back

if a decision was made not to allow soft reboot at all, then
a) it is a BAD BAD decision, as it forces people to do more harm than needed by using hardware means (power switch) where software recovery _may_ be possible
b) please link to corresponding Fedora Feature page and FESCO approval for such intrusive change before closing this

p.s. there was some discussion about that on test-list, quoting Jóhann B. Guðmundsson:

"SysRq is disable for are a reason and what you are propose allows anyone that sits at the keyboard to kill all process,reboot without syncing or authorization ..."

this is nonsense, anyone sitting at the keyboard can also access the hardware power switch in vast majority of cases (yes, even KVM solutions usually allow to toggle the power switch), so disabling SysRq altogether does not prevent people from "rebooting without syncing" or whatever alike - but if someone insists on locking the door with three keys while the window next to it is open wide, what about talking about appropriate SysRq mask instead of making this a false dilemma that you'd need to have either everything disabled or everything enabled?

Comment 3 Matthew Miller 2013-07-09 15:15:38 UTC
What is the exact sysrq function you would like to enable? Is it just "sync"?

Comment 4 Bill Nottingham 2013-07-09 20:37:02 UTC
sysrq is not enabled by default *very intentionally* - it has no mechanism for a clean shutdown.

You seem to be asking for a hard shutdown to be enabled by default everywhere (or an immediate kernel crash, or many other sysrq functions), because of a case where the system is in a space where soft shutdown fails.

I believe it's common procedure that , when a soft shutdown fails, you either configure sysrq if you want a software brute-force  method, or you kill the power.

Comment 5 Adam Pribyl 2013-07-10 11:53:57 UTC
This somehow gets out of my original intetion - the systemd is very prone to refuse to do anything in case anything gets wrong with its unit files. While in my opinion init was able to at least sent TERM and KILL to all processes on ctrl-alt-del in any case, systemd refuses to do anything in case ctrl-alt-del.target file is missing (e.g. rootfs is damaged). 

I thought this is not a good thing, reported it as a bug to systemd, but was refused that I shoudl use sysrq in such a case - but I can not, because sysrq is not enabled by default and I can not do anything on the system with damaged systemd configs. I know there is several levels of sysrq function you may enable, if we could enable by default e.g. only "sync->mount ro->reboot" it would be pretty fine for me and it may help others to save some headache on system that refuses to do anything even on ctrl-alt-del.