[systemd-devel] [PATCH 3/3] nspawn: allow to bind mount journal on top of a non empty container journal dentry
Djalal Harouni
tixxdz at opendz.org
Sat May 24 03:54:05 PDT 2014
On Thu, May 22, 2014 at 08:23:41AM +0200, Lennart Poettering wrote:
> On Tue, 29.04.14 00:15, Djalal Harouni (tixxdz at opendz.org) wrote:
>
> >
> > On Fri, Apr 25, 2014 at 08:30:36PM +0200, Tom Gundersen wrote:
> > > On Fri, Apr 11, 2014 at 2:45 AM, Djalal Harouni <tixxdz at opendz.org> wrote:
> > > > 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
> > >
> > > Hm, so this will allow some journal entries to be saved on the host
> > > and some on the guest, but only one of them
> > > will be shown by "journalctl --merge" at any given time... Won't this
> > > be confusing? Either way I guess this case
> > > should be documented in the manpage (either that it is not allowed, or
> > > that it may be confusing)...
> > Yes, to be honest, I'm also not sure! but I guess if the user wants to
> > move to the host, perhaps give him a chance, or at least document as you
> > have suggested, and warn during systemd-nspawn (will verify it later).
> >
> > So I'll wait to see what others think, or perhaps extend journalctl to
> > make this part of --merge ... ?
>
> Thinking about this and after having merged your patch earlier, I have
> now changed this slightly again, and readded the error message, but
> downgraded it to a warning. THis means you get what you ask for by
> passing --link-journal= but at least you are informed that somethoing is
> weird.
Ok, sounds good! yes we don't block users and we inform them.
I'll try to write a doc patch and send it for the "journalctl --merge"
that Tom reported!
> I hope this makes sense,
Yes, thank you.
I'm updating/rebasing the other two patches, will test them and send
soon.
> Lennart
>
> --
> Lennart Poettering, Red Hat
--
Djalal Harouni
http://opendz.org
More information about the systemd-devel
mailing list