LXD Getty Issues, wtmp grows over time

I’ve been running LXD containers, of various linux flavours, for the past year or so, to run unit-tests for a DevOps tool in development.  Recently discovered that /var/log/wtmp, and in some cases /var/log/messages, had been filling up.  In fact wtmp had filled up to the point the ‘last’ command was simply hanging trying to read it.

/var/log/messages was filling up with entries like:

So here are the fixes for each linux OS that I identified with the problem:

CentOS6

Edit /etc/init/tty.conf to comment out all entries and reboot.

CentOS7

Seemed to not experience the problem

Gentoo

Edit /etc/inittab comment out the c1:...agetty... line. Reboot.

OpenSuse13.2

This is systemd so:

This should list some units named getty@tty[1-4].service so these need stopping and disabling:

and reboot.

Oracle Linux 6

Edit /etc/init/tty.conf to comment out all entries and reboot.

Oracle Linux 7

This is systemd, again,  so:

This should list some units named getty@tty[1-4].service so these need stopping and disabling:

and reboot.

Ubuntu

14 and 16 both seemed to be ok

Leave a Reply

Your email address will not be published. Required fields are marked *