Skip to content

Commit 93f6da4

Browse files
committed
Fix another dependency loop
zfs-load-key-DATASET.service was gaining an After=systemd-journald.socket due to its stdout/stderr going to the journal (which is the default). systemd-journald.socket has an After (via RequiresMountsFor=/run/systemd/journal) on -.mount. If the root filesystem is encrypted, -.mount gets an After zfs-load-key-DATASET.service. By setting stdout and stderr to null on the key load services, we avoid this loop. Signed-off-by: Richard Laager <[email protected]> Closes: #10356
1 parent 1978441 commit 93f6da4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

etc/systemd/system-generators/zfs-mount-generator.in

+4
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ ${keymountdep}
221221
[Service]
222222
Type=oneshot
223223
RemainAfterExit=yes
224+
# This avoids a dependency loop involving systemd-journald.socket if this
225+
# dataset is a parent of the root filesystem.
226+
StandardOutput=null
227+
StandardError=null
224228
ExecStart=${keyloadcmd}
225229
ExecStop=${keyunloadcmd}" > "${dest_norm}/${keyloadunit}"
226230
fi

0 commit comments

Comments
 (0)