Skip to content

Commit 00e5e69

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 b6db7d7 commit 00e5e69

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
@@ -225,6 +225,10 @@ ${keymountdep}
225225
[Service]
226226
Type=oneshot
227227
RemainAfterExit=yes
228+
# This avoids a dependency loop involving systemd-journald.socket if this
229+
# dataset is a parent of the root filesystem.
230+
StandardOutput=null
231+
StandardError=null
228232
ExecStart=${keyloadcmd}
229233
ExecStop=${keyunloadcmd}" > "${dest_norm}/${keyloadunit}"
230234
fi

0 commit comments

Comments
 (0)