Bug#824779: container getty-static.service causes lxcfs high cpu usage

Michael Biebl biebl at debian.org
Tue Jul 19 13:12:44 BST 2016


On Sat, 16 Jul 2016 15:34:20 +0200 Martin Pitt <mpitt at debian.org> wrote:
> Control: tag -1 pending
> 
> Wang Jian [2016-05-19 23:59 +0800]:
> > getty-static.service starts getty on tty2-6, but container has only 4
> > ttys (1-4) at default. getty will exit and be respawned for tty5-tty6.
> > This leads to high cpu usage on host's lxcfs daemon.
> > 
> 
> There is no point in even wasting four getty processes on tty1-4 in
> LXC -- containers are not meant to have gettys on ttys in the first
> place. I committed a fix to git for that.
> (ConditionVirtualization=!container)

Given Lennarts explanation at [1], I would suggest that we replace that
condition with ConditionPathExists=/dev/tty0 (or rather, we replace
ConditionPathExists=/dev/tty2 with ConditionPathExists=/dev/tty0 and
what you already committed)

This is already used in /lib/systemd/system/getty at .service, so we'd be
consistent behaviour wise.

Interestingly, the Condition in getty at .service did not work in Wang's case.

@Wang: do you have an overriden getty at .service file in /etc/systemd/system?

Michael

[1]
https://lists.freedesktop.org/archives/systemd-devel/2016-July/037175.html
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20160719/c1838e96/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list