Comment 4 for bug 1844879

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

To summarize (out of the noisy test log).
What happens with this patch applied is that libvirt looses its LXC-guest on the restart of the service.

With the XML from the test this is what happens:
$ virsh define debian/tests/smoke-lxc.xml
$ virsh start sl
$ virsh list
 Id Name State
------------------------
 2280 sl running
$ virsh lxc-enter-namespace --noseclabel sl /bin/ls /bin/ls
/bin/ls
# At this point we know and have confirmed the guest works
# Now restarting libvirtd breaks it.
$ systemctl restart libvirtd
# Now the guest container is gone

Pre restart it looks like:
4 0 2426 1 20 0 138712 16132 poll_s Sl ? 0:00 /usr/lib/libvirt/libvirt_lxc --name sl --console 20 --security=apparmor --handshake 23
4 0 2428 2426 20 0 4084 3216 poll_s Ss+ pts/0 0:00 \_ /bin/bash

The guest log in /var/log/libvirt/lxc/sl.log gets this entry in !BOTH! cases:
2019-09-23 10:51:46.004+0000: 2426: error : virNetSocketReadWire:1804 : End of file while reading data: Input/output error
So this is a common red-herring, the system with systemd 241-7ubuntu1 has the same as well.

Another red-herring is the libvirtd service on restart reporting the LXC processes as left-over. This also happens with old and new systemd:
Sep 23 12:51:46 autopkgtest systemd[1]: libvirtd.service: Found left-over process 2428 (bash) in control group while starting unit. Ignoring.
Sep 23 12:51:46 autopkgtest systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Sep 23 12:51:46 autopkgtest systemd[1]: libvirtd.service: Found left-over process 2426 (libvirt_lxc) in control group while starting unit. Ignoring.
Sep 23 12:51:46 autopkgtest systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.

The error that is different between 241 and 243 is from the libvirtd daemon:
Sep 23 12:51:46 autopkgtest libvirtd[2448]: internal error: No valid cgroup for machine sl
Sep 23 12:51:46 autopkgtest libvirtd[2448]: End of file while reading data: Input/output error

This is not just a visibility problem, the process that was the guest really is gone at this point.