[systemd-devel] [PATCH] Avoid a busy systemd-journald in LXC environments

Dr. Werner Fink werner at suse.de
Wed Dec 18 06:30:08 PST 2013


On Tue, Dec 17, 2013 at 08:06:39PM +0100, Lennart Poettering wrote:
> 
> But why? LXC should either provide a working /dev/kmsg or none at
> all. Providing something that doesn't work where we then have to check
> with a lot of code if they are playing games with us or not is not an
> option really, sorry.

In the meanwhile the default LXC setup has been changed by the LXC
people.  Nevertheless I'm fairly certain the I'll see an other report
about this difficulty especially  from experienced adminstrators using
their own LXC setup.

> Anyway, I suggested in my original reply that I'd be happy to merge a
> patch that downgrades the warning message to debug on ENOENT. I have now
> made such a change in git, and also added another change that closes
> /dev/kmsg if we cannot make use of it anyway.

See the attched patch.

> 
> (Also, log_warning() and friends save/restore errno internally. And
> instead of repeating destruction paths in all if branches is something
> we don't do. Use "goto" to some unified destruction path at the end of
> the call. And running non-trivial functions from if checks is also not
> that a good idea).

Maybe an other interface in libudev for checking common devices would
help a lot.

> Anyway, with the code now in git, is there still something left to do to
> make journald work nicely with a properly set up LXC for you?

Currently I've reports with journaling/compressing file systems in the case
systemd-journald is flushing its journal to /var/log/journal/<id>/system.journal
which causes high system load if the journal is listed with journalctl.

Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: systemd.patch
Type: text/x-patch
Size: 1461 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20131218/355f35cb/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20131218/355f35cb/attachment.pgp>


More information about the systemd-devel mailing list