SOLVED: Generic Ubuntu 16.04 container image shows failed processes

The generic Ubuntu 16.04 container appears to come with failed services:

root@atom:~# systemctl --failed
● systemd-remount-fs.service loaded failed failed Remount Root and Kernel File Systems
● lvm2-lvmetad.socket loaded failed failed LVM2 metadata daemon socket

When I try to restart, say systemd-remount-fs, I find the following error in the systemd journal:

Apr 24 18:33:49 atom systemd[1]: Starting Remount Root and Kernel File Systems…
Apr 24 18:33:49 atom systemd-remount-fs[491]: mount: can’t find LABEL=cloudimg-rootfs

It seems the service doesn’t care for this /etc/fstab entry:

LABEL=cloudimg-rootfs / ext4 defaults 0 0

I can’t decide if this is anything to worry about. I found these because I couldn’t get nginx to start for some reason that I haven’t been able to track down yet, but that’s probably unrelated.

Second, I’m not sure why the generic 16.04 container image even includes lvm? Can anyone shed light on this?

LXD version (don’t think this matters?): 3.12

I have 16.04 and 18.04 containers, 16.04 display the same error about systemd-remount-fs.service, 18.04 don’t. I’d say that the reason for that is the entry at the end of the ‘Unit’ section for 18.04 service file:
so the service exists (it’s part of systemd after all) but it’s not loaded. I think that Ubuntu packagers added this entry (can’t find this line on current systemd Github).
Adding it (systemctl edit systemd-remount-fs.service) removed the message from the systemctl --failed list. In a nutshell, I think that this particuler systemd service does not make sense in a container, Ubuntu packagers removed it for 18.04 but not 16.04 (a small mistake after all Ubuntu 16.04 is still supported)

No idea about lvm2, I see no reason why lvm2 could not be used in a container and the socket is useful.

1 Like

Adding the suggested line to the Unit section /lib/systemd/system/systemd-remount-fs.service resolved the issue on Ubuntu 16.04 as well. Now I just need to track down what’s going on with the lvm metadata socket and nginx. Thanks for your help with this!

Could not get lvm2-lvmetad.socket to not show up as a failed service. Some website suggested doing this:

sudo systemctl disable lvm2-lvmetad.socket
sudo systemctl disable lvm2-lvmpolld.socket

But didn’t work. I ended up uninstalling the lvm2 package, which resolved the issue. Going to mark this as solved.