iscsi-initiator-utils/0026-try-not-to-require-network-online.patch
Gordon Messmer 1e689cd0c6 Avoid forcing remote-fs-pre after network-online if possible.
This change was discussed on devel@ (Re: "Improving Fedora boot
time when libvirt is installed"). Currently, when iscsi.service
is installed, it creates an ordering dependency that forces
network-online to start before remote-fs-pre.target, which delays
boot. This most commonly happens when virtualization support is
installed, which means that boot takes longer for many users who
aren't using iscsi.

This will also require that the system preset change from
iscsi.service to iscsi-starter.service.
2023-02-04 11:30:40 -08:00

35 lines
1.1 KiB
Diff

--- a/Makefile 2023-01-22 13:02:45.681282358 -0800
+++ b/Makefile 2023-01-22 13:03:42.152589777 -0800
@@ -28,6 +28,7 @@
IFACEFILES = etc/iface.example
RULESFILES = utils/50-iscsi-firmware-login.rules
SYSTEMDFILES = etc/systemd/iscsi.service \
+ etc/systemd/iscsi-starter.service \
etc/systemd/iscsi-init.service \
etc/systemd/iscsid.service etc/systemd/iscsid.socket \
etc/systemd/iscsiuio.service etc/systemd/iscsiuio.socket
--- a/etc/systemd/iscsi.service 2023-01-22 13:09:30.516486288 -0800
+++ b/etc/systemd/iscsi.service 2023-01-22 13:08:34.404180819 -0800
@@ -15,4 +15,4 @@
SuccessExitStatus=21
[Install]
-WantedBy=remote-fs.target
+Also=iscsi-starter.service
--- a/dev/null 2023-01-22 13:38:59.072998978 -0800
+++ b/etc/systemd/iscsi-starter.service 2023-01-22 13:42:20.124610009 -0800
@@ -0,0 +1,13 @@
+[Unit]
+DefaultDependencies=no
+Before=sysinit.target iscsi.service
+RequiresMountsFor=/var/lib/iscsi/nodes
+ConditionDirectoryNotEmpty=/var/lib/iscsi/nodes
+
+[Service]
+Type=oneshot
+RemainAfterExit=true
+ExecStart=systemctl start --no-block --job-mode=fail iscsi.service
+
+[Install]
+WantedBy=sysinit.target