From 574edc90066c3faeadcf4666928ed9b0ac409c75 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 20 Nov 2014 14:30:52 +0100 Subject: nspawn: Add try-{host,guest} journal link modes --link-journal={host,guest} fail if the host does not have persistent journalling enabled and /var/log/journal/ does not exist. Even worse, as there is no stdout/err any more, there is no error message to point that out. Introduce two new modes "try-host" and "try-guest" which don't fail in this case, and instead just silently skip the guest journal setup. Change -j to mean "try-guest" instead of "guest", and fix the wrong --help output for it (it said "host" before). Change systemd-nspawn@.service.in to use "try-guest" so that this unit works with both persistent and non-persistent journals on the host without failing. https://bugs.debian.org/770275 --- man/systemd-nspawn.xml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'man') diff --git a/man/systemd-nspawn.xml b/man/systemd-nspawn.xml index b3a2d32855..75db65eac0 100644 --- a/man/systemd-nspawn.xml +++ b/man/systemd-nspawn.xml @@ -439,7 +439,9 @@ versa). Takes one of no, host, + try-host, guest, + try-guest, auto. If no, the journal is not linked. If host, @@ -453,8 +455,11 @@ guest file system (beneath /var/log/journal/machine-id) and the subdirectory is symlinked into the host - at the same location. If - auto (the default), + at the same location. try-host + and try-guest do the same + but do not fail if the host does not have + persistant journalling enabled. + If auto (the default), and the right subdirectory of /var/log/journal exists, it will be bind mounted @@ -473,7 +478,7 @@ Equivalent to - . + . -- cgit v1.2.3-54-g00ecf