Bug 1280187

Summary: kdump failed to reboot
Product: [Fedora] Fedora Reporter: lnie <lnie>
Component: kexec-toolsAssignee: Dave Young <ruyang>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bhe, ruyang, wcwxyz
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1290687 (view as bug list) Environment:
Last Closed: 2015-12-11 07:32:58 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:
Bug Depends On:    
Bug Blocks: 1290687    
Attachments:
Description Flags
kdump_log none

Description lnie 2015-11-11 06:57:19 UTC
Created attachment 1092591 [details]
kdump_log

Description of problem:
After trigger crash,kdump saved vmcore successfully,but failed to reboot.


Version-Release number of selected component (if applicable):
 kernel-4.4.0-0.rc0.git4.2.fc24.x86_64

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Dangyi Liu 2015-11-12 07:29:52 UTC
This bug is caused by that systemd refuses to reboot during booting up.

kdump-capture.service will call "reboot" to boot back to first kernel, without executing the following init tasks. But systemd thinks it's a conflict that kdump-capture.service is wanted by initrd.target and initrd.target is implicitly conflicted with shutdown.target (reboot.target), thus refuses to reboot.

Visual graph:

  initrd ----want---> kdump ----call---> reboot ----requires---> shutdown
     |                                                              |
     ---------------------implicitly conflict------------------------

Comment 2 Dangyi Liu 2015-11-12 08:26:12 UTC
OK, a super easy solution: use 'systemctl -f -f reboot' instead of 'reboot'.

Comment 3 Dave Young 2015-11-13 02:00:50 UTC
Dangyi:

We used force reboot previously, but turned to systemd reboot later for safe unmount filesystems etc.

How does one reboot in initrd, is there any example we can refer to?

Thanks
Dave

Comment 4 Dave Young 2015-11-13 02:02:18 UTC
Another problem is why this only happens in rawhide, what changes cause it.

Comment 5 Dangyi Liu 2015-11-26 06:33:26 UTC
(In reply to Dave Young from comment #3)
> Dangyi:
> 
> We used force reboot previously, but turned to systemd reboot later for safe
> unmount filesystems etc.
> 
> How does one reboot in initrd, is there any example we can refer to?
> 
> Thanks
> Dave

"reboot" will

1. Stop all services that are conflicting with "shutdown.target"
2. Call "reboot -f"

"reboot -f" will

1. Send SYSTERM (then SYSKILL) to all processes
2. Unmount all mountpoints and swapoff
3. call "reboot -f -f"

So maybe we can call "reboot -f" since most startup services are oneshots and don't need to be stopped.

Comment 7 Dave Young 2015-12-11 07:32:58 UTC
Fixed by change reboot to "systemctl reboot -f"

But it originaly works we are still not sure if it is cause by which systemd change and why.

Will clone a bug for systemd for tracking the issue.