[lxc-users] systemd and logging in containers

Michael H. Warfield mhw at WittsEnd.com
Tue Jun 10 22:15:24 UTC 2014


On Tue, 2014-06-10 at 16:51 -0400, Leonid Isaev wrote:
> Hi,
> 
> On Tue, Jun 10, 2014 at 03:43:12PM -0400, Michael H. Warfield wrote:
> > Date: Tue, 10 Jun 2014 15:43:12 -0400
> > From: "Michael H. Warfield" <mhw at WittsEnd.com>
> > To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org>
> > Subject: Re: [lxc-users] systemd and logging in containers
> > X-Mailer: Evolution 3.10.4 (3.10.4-2.fc20)
> > 
> > On Tue, 2014-06-10 at 21:19 +0200, István Király wrote:
> > > Hi list, ..
> > 
> > > Fedora 20 host and containers.
> > 
> > > Some programms are logging normal, apache, mariadb, .. 
> > 
> > > But some others have no log at all, for example maillog is 0 in all my
> > > containers, but they have postfix / dovecot running.
> > 
> > > I experimented a little today, with a custom script echoing messages
> > > to standard output, and created a systemd unit file for it. ..
> > 
> > > When I run this script as service on the host, I get the messages from
> > > systemctl status test.service.
> > 
> > > When I run this script from a container, the messages are not in
> > > systemctl status, and I can't find them.
> > 
> > > Checked if maybe packages are missing, but all seems to be okay, ..
> > 
> > > .. anyone have any ideas?
> > 
> > Yes.
> > 
> > Several revs back on systemd, the systemd-journald.service was horribly
> > broken and, at random, eating CPU time for lunch, particularly in
> > containers.  That turned out to be a bug involving (iirc) logging
> > objects and object id's and user logs with conflicting ids.
> > 
> > During this period of time, I coded the Fedora template to disable and
> > mask systemd-journald.service.  They have since fixed this bug and I've
> > reenabled it in the template, but containers built prior to this will
> > have the systemd-journal service disabled and masked.

> I'm surprised it actually worked -- what systemd version was that?

It did at the time.  :-)=)  I don't recall the specific version but I
recall having a hell of a time with journald sucking down the CPU under
F18 and F19.

> I don't think you can 'disable' (stop) journal in new-ish systemd (i.e. >=210)
> because it is a core module, so the best you can do is to set Storage=none in
> journald.conf.

I'll have to look into that.

> HTH,

Thanks!

Regards,
Mike
-- 
Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140610/85ad1cab/attachment.sig>


More information about the lxc-users mailing list