On 12/11/15 at 02:17pm, Baoquan He wrote:
On 12/11/15 at 02:03pm, Dave Young wrote:
> In latest rawhide kdump kernel reboot hangs because systemd reports a
> conflict when kdump calls reboot during booting because it tries to stop
> services while they are starting up.
One more place. Here it tries to stop services while they are starting
up. "it" means "reboot", "they" means services which is
being stopped by
reboot?
If yes, it should be:
because it tries to stop services which are starting up.
Or
because it tries to stop services which are being started up.
The rest is very clear.
Oh, re-read it again, the original description sounds good. Then please
ignore this one. Ack this patch.
Acked-by: Baoquan He <bhe(a)redhat.com>
Thanks
Baoquan
>
> Thanks.
> >
> > We previouly use "reboot -f" but later we changed to reboot because we
want
> > systemd to take care of the shutdown path, mainly for umount filesystems.
> >
> > Change back to "reboot -f" works but we still need umount by
ourselves.
> > During my tests with "reboot -f" I get below dirty ext2 filesystem:
> >
> > [root@localhost ~]# fsck /dev/vdb
> > fsck from util-linux 2.27
> > e2fsck 1.42.13 (17-May-2015)
> > /dev/vdb was not cleanly unmounted, check forced.
> >
> > Actually "reboot -f" equals to "systemctl reboot -f -f"
> >
> > systemctl manpage says "-f" and "-f -f" means different
behavior:
> > When use -f with reboot, will execute reboot without shutting down all units.
> > However all processes will be killed forcibly and all file systems are
> > unmounted or remounted read-only. If -f is specified twice, will reboot
> > immediately without terminating any processes or unmounting any file systems.
> >
> > Thus change to use "systemctl reboot -f" for our reboot actions. It
can fix
> > the problem and at the same time it can ensure filesystems are umounted before
> > rebooting.
> >
> > OTOH, a systemd changes cause the breakage, it may be a system service new
> > design, Later I can dig into systemd changes see which commit cause the
> > breakage.
> >
> > Signed-off-by: Dave Young <dyoung(a)redhat.com>
> > Signed-off-by: Dangyi Liu <dliu(a)redhat.com>
> > ---
> > kdump-lib-initramfs.sh | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > --- kexec-tools.orig/kdump-lib-initramfs.sh
> > +++ kexec-tools/kdump-lib-initramfs.sh
> > @@ -6,14 +6,14 @@ KDUMP_PATH="/var/crash"
> > CORE_COLLECTOR=""
> > DEFAULT_CORE_COLLECTOR="makedumpfile -l --message-level 1 -d 31"
> > DMESG_COLLECTOR="/sbin/vmcore-dmesg"
> > -DEFAULT_ACTION="reboot"
> > +DEFAULT_ACTION="systemctl reboot -f"
> > DATEDIR=`date +%Y-%m-%d-%T`
> > HOST_IP='127.0.0.1'
> > DUMP_INSTRUCTION=""
> > SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa"
> > KDUMP_SCRIPT_DIR="/kdumpscripts"
> > DD_BLKSIZE=512
> > -FINAL_ACTION="reboot"
> > +FINAL_ACTION="systemctl reboot -f"
> > KDUMP_CONF="/etc/kdump.conf"
> > KDUMP_PRE=""
> > KDUMP_POST=""
> > @@ -57,7 +57,7 @@ get_kdump_confs()
> > DEFAULT_ACTION="kdump_emergency_shell"
> > ;;
> > reboot)
> > - DEFAULT_ACTION="reboot"
> > + DEFAULT_ACTION="systemctl reboot -f"
> > ;;
> > halt)
> > DEFAULT_ACTION="halt"