chiark / gitweb /
nspawn: allow to bind mount journal on top of a non empty container journal dentry
authorDjalal Harouni <tixxdz@opendz.org>
Fri, 11 Apr 2014 00:45:52 +0000 (01:45 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 22 May 2014 00:55:23 +0000 (09:55 +0900)
commite6a4a517befe559adf6d1dbbadf425c3538849c9
tree2a6fda462a6e6ce4f86b460a21f21f391b4a0508
parent2f14583f4757b934639da164a9fc20ab5da72f00
nspawn: allow to bind mount journal on top of a non empty container journal dentry

Currently if nspawn was called with --link-journal=host or
--link-journal=auto and the right /var/log/journal/machine-id/ exists
then the bind mount the subdirectory into the container might fail due
to the ~/mycontainer/var/log/journal/machine-id/ of the container not
being empty.

There is no reason to check if the container journal subdir is empty
since there will be a bind mount on top of it. The user asked for a bind
mount so give it.

Note: a next call with --link-journal=guest may fail due to the
/var/log/journal/machine-id/ on the host not being empty.

https://bugs.freedesktop.org/show_bug.cgi?id=76193

Reported-by: Tobias Hunger <tobias.hunger@gmail.com>
src/nspawn/nspawn.c