dracut/modules.d/98dracut-systemd
Martin Wilck 4c2d98c75b emergency.service: use Type=idle
Type=oneshot, as currently set in dracut's emergency service file,
causes an awkward situation if emergency mode is entered e.g. because
of a root device timeout, and the root device appears later because it
just has taken longer than the timeout. In that situation, my
expectation (backed by past positive experience) is that the user should
be able to simply exit the emergency shell and resume normal boot.

:/# systemctl status sysroot.mount
● sysroot.mount - /sysroot
   Loaded: loaded (/proc/cmdline; bad; vendor preset: enabled)
   Active: active (mounted) since Mon 2017-10-09 14:32:15 CEST; 16s ago
    Where: /sysroot
     What: /dev/mapper/3600601600a30200024fbbaf3f500e411-part5
     Docs: man:fstab(5)
           man:systemd-fstab-generator(8)
  Process: 1873 ExecMount=/usr/bin/mount /dev/disk/by-uuid/63751805-6abc-46a3-a66f-427920dece4d /sysroot -o ro (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 512)

:/# systemctl list-jobs
JOB UNIT              TYPE  STATE
 56 emergency.target  start waiting
 57 emergency.service start running

2 jobs listed.
:/# exit
logout
Failed to start default.target: Transaction is destructive.

(system keeps idling from this point on, user has no chance to
do anything).

This results from the combination of two effects:
1) initrd-root-fs.target sets "OnFailureJobMode=replace-irreversibly",
2) emergency.service's Type=oneshot causes the start jobs for both
emergency.service and emergency.target to persist while the user is in
the emergency shell.

When the shell is exited, systemd tries to isolate "initrd.target"
again, but this fails with "the transaction is destructive" error
because of the still pending jobs.

This patch fixes this by changing the Type of "emergency.service" from
"oneshot" to "idle".
2017-10-09 14:51:45 +02:00
..
dracut-cmdline-ask.service dracut-systemd: fixed dependencies 2017-07-28 10:19:26 +02:00
dracut-cmdline-ask.sh dracut-systemd/dracut-cmdline-ask: fix dracut --kernel-cmdline=rd.cmdline=ask 2016-02-15 08:47:47 +00:00
dracut-cmdline.service dracut-systemd: fixed dependencies 2017-07-28 10:19:26 +02:00
dracut-cmdline.service.8.asc Split the systemd dracut module up 2015-03-19 10:07:37 +01:00
dracut-cmdline.sh 99base: apply kernel module memory debug support 2016-11-27 12:09:10 +08:00
dracut-emergency.service dracut-systemd: fixed dependencies 2017-07-28 10:19:26 +02:00
dracut-emergency.sh add rd.emergency=[reboot|poweroff|halt] 2016-07-22 14:51:03 +02:00
dracut-initqueue.service dracut-systemd: fixed dependencies 2017-07-28 10:19:26 +02:00
dracut-initqueue.service.8.asc Split the systemd dracut module up 2015-03-19 10:07:37 +01:00
dracut-initqueue.sh Revert "Let user specify the action after fail" 2015-11-13 13:22:34 +01:00
dracut-mount.service dracut-systemd: fixed dependencies 2017-07-28 10:19:26 +02:00
dracut-mount.service.8.asc Split the systemd dracut module up 2015-03-19 10:07:37 +01:00
dracut-mount.sh Revert "Let user specify the action after fail" 2015-11-13 13:22:34 +01:00
dracut-pre-mount.service dracut-systemd: add back missing dependencies 2017-07-28 11:57:07 +02:00
dracut-pre-mount.service.8.asc Split the systemd dracut module up 2015-03-19 10:07:37 +01:00
dracut-pre-mount.sh 99base: apply kernel module memory debug support 2016-11-27 12:09:10 +08:00
dracut-pre-pivot.service dracut-systemd: add back missing dependencies 2017-07-28 11:57:07 +02:00
dracut-pre-pivot.service.8.asc Split the systemd dracut module up 2015-03-19 10:07:37 +01:00
dracut-pre-pivot.sh 99base: apply kernel module memory debug support 2016-11-27 12:09:10 +08:00
dracut-pre-trigger.service dracut-systemd: fixed dependencies 2017-07-28 10:19:26 +02:00
dracut-pre-trigger.service.8.asc Split the systemd dracut module up 2015-03-19 10:07:37 +01:00
dracut-pre-trigger.sh 99base: apply kernel module memory debug support 2016-11-27 12:09:10 +08:00
dracut-pre-udev.service dracut-systemd: fixed dependencies 2017-07-28 10:19:26 +02:00
dracut-pre-udev.service.8.asc Split the systemd dracut module up 2015-03-19 10:07:37 +01:00
dracut-pre-udev.sh Split the systemd dracut module up 2015-03-19 10:07:37 +01:00
dracut-shutdown.service dracut-systemd/*.service: fix copyright message and comment 2017-07-28 10:17:06 +02:00
dracut-shutdown.service.8.asc Split the systemd dracut module up 2015-03-19 10:07:37 +01:00
dracut-tmpfiles.conf Split the systemd dracut module up 2015-03-19 10:07:37 +01:00
emergency.service emergency.service: use Type=idle 2017-10-09 14:51:45 +02:00
module-setup.sh dracut-systemd/module-setup.sh: remove duplicate vconsole wants 2015-11-11 12:16:13 +01:00
rootfs-generator.sh systemd: fix setting of timeouts for device units 2017-10-06 10:05:25 +02:00