mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-30 17:45:23 +00:00
Treat missing driver cgroup as fatal in LXC driver
The LXC driver relies on use of cgroups to kill off LXC processes
in shutdown. If cgroups aren't available, we're unable to kill
off processes, so we must treat lack of cgroups as a fatal startup
error.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 7c5ba648f7
)
This commit is contained in:
parent
7e3b1283f1
commit
1083e4183f
@ -229,10 +229,6 @@ int virLXCCgroupSetup(virDomainDefPtr def)
|
|||||||
|
|
||||||
rc = virCgroupForDriver("lxc", &driver, 1, 0);
|
rc = virCgroupForDriver("lxc", &driver, 1, 0);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
/* Skip all if no driver cgroup is configured */
|
|
||||||
if (rc == -ENXIO || rc == -ENOENT)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
virReportSystemError(-rc, "%s",
|
virReportSystemError(-rc, "%s",
|
||||||
_("Unable to get cgroup for driver"));
|
_("Unable to get cgroup for driver"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
Loading…
Reference in New Issue
Block a user