[lxc-users] systemd and logging in containers

Leonid Isaev lisaev at umail.iu.edu
Tue Jun 10 20:51:38 UTC 2014


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?

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.

HTH,
-- 
Leonid Isaev
GPG fingerprints: DA92 034D B4A8 EC51 7EA6  20DF 9291 EE8A 043C B8C4
                  C0DF 20D0 C075 C3F1 E1BE  775A A7AE F6CB 164B 5A6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140610/f990b496/attachment.sig>


More information about the lxc-users mailing list