[Bug 671673] New: systemd: kexec reboots instead of kexecing
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c0 Summary: systemd: kexec reboots instead of kexecing Classification: openSUSE Product: openSUSE 11.4 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: jslaby@novell.com QAContact: qa@suse.de CC: kasievers@novell.com Found By: --- Blocker: --- After I switched to systemd, if I try to kexec a new kernel, the system reboots instead of kexec. With sysvinit it works as expected. I run: kexec /boot/vmlinuz --initrd=/boot/initrd --append='3 console=ttyS0,115200' -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c1 --- Comment #1 from Kay Sievers <kasievers@novell.com> 2011-02-14 11:18:01 UTC --- systemd has native kexec support. does: systemd kexec work? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c2 --- Comment #2 from Kay Sievers <kasievers@novell.com> 2011-02-14 11:18:19 UTC --- oops, systemctl, i meant -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c3 --- Comment #3 from Jiri Slaby <jslaby@novell.com> 2011-02-14 11:29:39 UTC --- (In reply to comment #1)
systemd has native kexec support. does: systemd kexec work?
Hmm, no. How the parameters are supposed to be passed: # systemctl kexec /boot/vmlinuz --initrd abc systemctl: unrecognized option '--initrd' -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c wei wang <wewang@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wewang@novell.com AssignedTo|bnc-team-screening@forge.pr |kasievers@novell.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c4 --- Comment #4 from Kay Sievers <kasievers@novell.com> 2011-02-16 14:53:30 UTC --- "kexec -l ..." loads the kernel and the parameters "kexec -e" boots the kernel with native systemd, the "kexec -e" step should be "systemctl kexec" -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c5 --- Comment #5 from Jiri Slaby <jslaby@novell.com> 2011-02-19 18:27:55 UTC --- (In reply to comment #4)
"kexec -l ..." loads the kernel and the parameters "kexec -e" boots the kernel
with native systemd, the "kexec -e" step should be "systemctl kexec"
There is a third functionality of kexec. Without loading you do: kexec /boot/vmlinuz --initrd=/boot/initrd --command-line='...' and it does all the needed steps including services shutdown. And that one doesn't work with systemd. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c6 --- Comment #6 from Jiri Slaby <jslaby@novell.com> 2011-02-19 18:30:45 UTC --- Manpage says: It's also possible to invoke kexec without an option parameter. In that case, kexec loads the specified kernel and then invokes shutdown(1). If the shutdown scripts of your Linux distribution support kexec-based rebooting, they then call kexec -e just before actually rebooting the machine. That way, the machine does a clean shutdown including all shutdown scripts. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c7 --- Comment #7 from Kay Sievers <kasievers@novell.com> 2011-02-20 12:37:59 UTC --- Yeah, that's currently the expected behavior with systemd. /sbin/shutdown is linked to "systemctl poweroff" For kexec execution, systemd does not do implicit different behavior depending on the load-state of a possible kexec kernel like the sysv halt script did, it requires the explicit "kexec" command to be given. We might want to patch the kexec binary to know about systemd, or just the sysv compat code in systemctl. I'll check with upstream ... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c8 Kay Sievers <kasievers@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #8 from Kay Sievers <kasievers@novell.com> 2011-02-20 20:11:25 UTC --- Added code to the systemctl sysv compat support: http://cgit.freedesktop.org/systemd/commit/?id=5622dde36deb414ab372a2d767584... This: kexec /boot/vmlinuz --initrd=/boot/initrd --command-line='...' now results in: systemd[1]: About to execute: /bin/systemctl --force kexec during reboot. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c9 Jiri Slaby <jslaby@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | AssignedTo|kasievers@novell.com |fcrozat@novell.com --- Comment #9 from Jiri Slaby <jslaby@novell.com> 2011-08-20 21:48:44 UTC --- (In reply to comment #8)
Added code to the systemctl sysv compat support:
http://cgit.freedesktop.org/systemd/commit/?id=5622dde36deb414ab372a2d767584...
The commit is part of systemd 19. But it still doesn't work with factory (systemd 33). It just reboots... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c10 --- Comment #10 from Frederic Crozat <fcrozat@novell.com> 2011-08-22 09:29:27 UTC --- hmm, I just ran "kexec /boot/vmlinuz --initrd=/boot/initrd --command-line='3'" under a Factory system running with systemd and system shutdowned, ran kexec on the kernel and booted correctly. Could you give me a complete test case ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c11 --- Comment #11 from Jiri Slaby <jslaby@novell.com> 2011-08-22 10:50:18 UTC --- (In reply to comment #10)
hmm, I just ran "kexec /boot/vmlinuz --initrd=/boot/initrd --command-line='3'" under a Factory system running with systemd and system shutdowned, ran kexec on the kernel and booted correctly.
Could you give me a complete test case ?
Hmm, this is interesting. I don't know what exactly I should provide. When I boot with sysvinit and do the command you do, it works. With systemd it shutdowns the system and reboots. It is an updated factory with the -next kernel. But I also tried 3.0 and 2.6.37 from kernel:11.4 and kernel:stable respectively with the same result. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c12 --- Comment #12 from Frederic Crozat <fcrozat@novell.com> 2011-08-22 11:23:11 UTC --- hmm, interesting indeed, now, I tried again to run the test and running the command reboots the system (and it was working this morning).. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c13 --- Comment #13 from Frederic Crozat <fcrozat@novell.com> 2011-08-22 12:47:37 UTC --- After testing more, there is a different behaviour if systemd-sysvinit is installed or not : - if systemd-sysvinit is installed, kexec works as expected - if systemd-sysvinit is not installed, reboot is done instead of kexec, because /sbin/shutdown is handled by sysvinit and systemd doesn't check for kexec_loaded value. I'll fix that. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c14 --- Comment #14 from Frederic Crozat <fcrozat@novell.com> 2011-08-22 14:26:29 UTC --- fixed in home:fcrozat:systemd/systemd. Will land in Base:System (and Factory) later. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c15 Frederic Crozat <fcrozat@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |CLOSED Resolution| |FIXED --- Comment #15 from Frederic Crozat <fcrozat@novell.com> 2011-08-24 16:49:05 UTC --- landed in Base:System -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=671673 https://bugzilla.novell.com/show_bug.cgi?id=671673#c16 --- Comment #16 from Bernhard Wiedemann <bwiedemann@novell.com> 2011-08-24 19:00:09 CEST --- This is an autogenerated message for OBS integration: This bug (671673) was mentioned in https://build.opensuse.org/request/show/79689 Factory / systemd -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com