libvirt/src/lxc
Cole Robinson 1b9ce05ce2 lxc: controller: Fix container launch on cgroup v1
With cgroup v1 I'm seeing LXC container startup failures:

$ sudo virt-install --connect lxc:/// --name test-container --memory 128
--boot init=/bin/sh

Starting install...
ERROR    error from service:
GDBus.Error:org.freedesktop.machine1.NoMachineForPID: PID 2145047 does
not belong to any known machine

libvirt 7.0.0 works but 7.1.0+ does not. The root error seems to predate
that, showing up in syslog, but commit 9c1693eff made it fatal:

commit 9c1693eff4
Author: Pavel Hrdina <phrdina@redhat.com>
Date:   Fri Feb 5 16:17:35 2021 +0100

     vircgroup: use DBus call to systemd for some APIs

The error comes from virSystemdGetMachineByPID. The PID that shows up in
the above error message does not match the leader PID as reported by
machinectl.

This change fixes the error. Things seem to continue to work with
cgroupsv2 after this change.

https://gitlab.com/libvirt/libvirt/-/issues/182

Tested-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-10-08 13:20:46 -04:00
..
libvirtd_lxc.aug src: fix word spell typos 2020-07-09 10:01:41 +02:00
lxc_cgroup.c Replace AbsPath judgement method with g_path_is_absolute() 2021-04-21 10:02:09 +02:00
lxc_cgroup.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lxc_conf.c lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lxc_conf.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lxc_container.c lxcContainerSetReadOnly: Refactor cleanup handling 2021-08-09 10:09:01 +02:00
lxc_container.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lxc_controller.c lxc: controller: Fix container launch on cgroup v1 2021-10-08 13:20:46 -04:00
lxc_domain.c lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lxc_domain.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lxc_driver.c virhostmem: Let caller pass max NUMA node to virHostMemAllocPages 2021-08-23 14:00:15 +02:00
lxc_driver.h src/lxc: use #pragma once in headers 2019-06-19 17:12:30 +02:00
lxc_fuse.c lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lxc_fuse.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lxc_hostdev.c lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lxc_hostdev.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lxc_monitor_protocol.x
lxc_monitor.c rpc: remove "spawnDaemon" parameter 2021-06-04 11:42:59 +01:00
lxc_monitor.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lxc_native.c conf: Store SCSI bus length in virDomainDef 2021-08-16 14:22:38 +02:00
lxc_native.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lxc_process.c src: fix generation of default resource partition 2021-08-26 18:25:29 +02:00
lxc_process.h lib: Drop internal virXXXPtr typedefs 2021-04-13 17:00:38 +02:00
lxc.conf lxc.conf: s/QEMU/LXC/ 2016-11-09 18:56:15 +01:00
meson.build build: Remove unused 'conflicts' key from virt_daemon_unit 2021-02-10 09:30:41 -07:00
test_libvirtd_lxc.aug.in build: use @CONFIG@ instead of ::CONFIG:: in augeas tests 2019-08-09 14:06:31 +01:00
virtlxcd.init.in configure: Provide OpenRC scripts for sub-daemons 2019-12-16 10:11:22 +01:00
virtlxcd.service.in systemd: Move timeout from service files to sysconf files 2020-04-03 11:50:50 +02:00
virtlxcd.sysconf systemd: Move timeout from service files to sysconf files 2020-04-03 11:50:50 +02:00