chiark / gitweb /
nspawn: Add try-{host,guest} journal link modes
authorMartin Pitt <martin.pitt@ubuntu.com>
Thu, 20 Nov 2014 13:30:52 +0000 (14:30 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 21 Nov 2014 13:27:26 +0000 (14:27 +0100)
commit574edc90066c3faeadcf4666928ed9b0ac409c75
treeb5ea9f666f2ef3b366e7722c5a2aa97e4f92433f
parent812bd1e6ab4c463507557f2bdbb8875fedd92ade
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
src/nspawn/nspawn.c
units/systemd-nspawn@.service.in