Bug 1437107

Summary: initrd-cleanup.service gets started and fails after Crash dump
Product: Red Hat Enterprise Linux 7 Reporter: Daniel Borek <dborek>
Component: kexec-toolsAssignee: Xunlei Pang <xlpang>
Status: CLOSED ERRATA QA Contact: Qiao Zhao <qzhao>
Severity: low Docs Contact:
Priority: low    
Version: 7.3CC: kdump-team-bugs, mschena, piliu, qzhao, ruyang, xlpang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: kexec-tools-2.0.14-7.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 09:33:50 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:

Description Daniel Borek 2017-03-29 13:54:35 UTC
Description of problem:

Whenever we take crash dump and kdump completes saving vmcore, there is number of services that get stopped successfully and just before system reboots the initrd-cleanup.service starts. The service fails and the system continues regardless, rebooting within fraction of a second.
This causes customer concern and perhaps we don't actually need the service. It merely isolates root switch which probably isn't necessary given system is going down anyway. 

Version-Release number of selected component (if applicable):


How reproducible:

100% reproducible on customer's system and my virtualbox instance.

Steps to Reproduce:
1. Install 7.3 and configure kdump.
2. Run echo c > /proc/sysrq-trigger
3. Watch the console, message about failed service appears for split second and system reboots.

Actual results:

Here's console log:
makedumpfile Completed.
kdump: saving vmcore complete
[  OK  ] Stopped target Timers.
[  OK  ] Stopped dracut pre-udev hook.
         Stopping dracut pre-udev hook...
[  OK  ] Stopped dracut cmdline hook.
         Stopping dracut cmdline hook...
[  OK  ] Stopped Kdump Vmcore Save Service.
[  OK  ] Stopped dracut pre-pivot and cleanup hook.
         Stopping dracut pre-pivot and cleanup hook...
[  OK  ] Stopped target Remote File Systems.
[  OK  ] Stopped target Remote File Systems (Pre).
[  OK  ] Stopped target Initrd Default Target.
[  OK  ] Stopped target Basic System.
[  OK  ] Stopped target Paths.
[  OK  ] Stopped target Sockets.
[  OK  ] Stopped target System Initialization.
[  OK  ] Stopped Create Static Device Nodes in /dev.
         Stopping Create Static Device Nodes in /dev...
[  OK  ] Stopped target Local File Systems.
[  OK  ] Stopped Apply Kernel Variables.
         Stopping Apply Kernel Variables...
[  OK  ] Reached target Shutdown.
[  OK  ] Stopped target Swap.
[  OK  ] Stopped target Slices.
[  OK  ] Stopped target Initrd Root File System.
         Unmounting /sysroot...
[  OK  ] Stopped target Initrd File Systems.
         Starting Cleaning Up and Shutting Down Daemons...
[  OK  ] Stopped dracut initqueue hook.
         Stopping dracut initqueue hook...
[FAILED] Failed to start Cleaning Up and Shutting Down Daemons.
See 'systemctl status initrd-cleanup.service' for details.
[  182.377630] XFS (dm-0): Unmounting Filesystem
[  OK  ] Unmounted /sysroot.
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Reached target Final Step.
         Starting Reboot...
[  182.489395] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[  182.494431] systemd-journald[89]: Received SIGTERM from PID 1 (systemd-shutdow).
[  182.498188] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[  182.502688] systemd-shutdown[1]: Unmounting file systems.
[  182.505126] systemd-shutdown[1]: All filesystems unmounted.
[  182.507459] systemd-shutdown[1]: Deactivating swaps.
[  182.509555] systemd-shutdown[1]: All swaps deactivated.
[  182.511820] systemd-shutdown[1]: Detaching loop devices.
[  182.514110] systemd-shutdown[1]: All loop devices detached.
[  182.516406] systemd-shutdown[1]: Detaching DM devices.
[  182.518571] systemd-shutdown[1]: Detaching DM 253:0.
[  182.522985] systemd-shutdown[1]: All DM devices detached.
[  182.525434] systemd-shutdown[1]: Rebooting.



Expected results:
initrd-cleanup.service to not be called if it's unnecessary or to start cleanly if it's truly needed at this stage.


Additional info:

Comment 2 Xunlei Pang 2017-04-17 08:10:18 UTC
Fedora commit b2534348199a("use "systemctl reboot -f" for reboot action") should be able to fix this.

Comment 8 errata-xmlrpc 2017-08-01 09:33:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2300