mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Add logging to LXC cgroup devices setup
To facilitate debugging, add some more logging to LXC cgroup devices ACL setup. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
64d4eb6a50
commit
1d8afffecd
@ -347,6 +347,7 @@ static int virLXCCgroupSetupDeviceACL(virDomainDefPtr def,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VIR_DEBUG("Allowing any disk block devs");
|
||||||
for (i = 0; i < def->ndisks; i++) {
|
for (i = 0; i < def->ndisks; i++) {
|
||||||
if (def->disks[i]->type != VIR_DOMAIN_DISK_TYPE_BLOCK)
|
if (def->disks[i]->type != VIR_DOMAIN_DISK_TYPE_BLOCK)
|
||||||
continue;
|
continue;
|
||||||
@ -360,6 +361,7 @@ static int virLXCCgroupSetupDeviceACL(virDomainDefPtr def,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VIR_DEBUG("Allowing any filesystem block devs");
|
||||||
for (i = 0; i < def->nfss; i++) {
|
for (i = 0; i < def->nfss; i++) {
|
||||||
if (def->fss[i]->type != VIR_DOMAIN_FS_TYPE_BLOCK)
|
if (def->fss[i]->type != VIR_DOMAIN_FS_TYPE_BLOCK)
|
||||||
continue;
|
continue;
|
||||||
@ -372,6 +374,7 @@ static int virLXCCgroupSetupDeviceACL(virDomainDefPtr def,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VIR_DEBUG("Allowing any hostdev block devs");
|
||||||
for (i = 0; i < def->nhostdevs; i++) {
|
for (i = 0; i < def->nhostdevs; i++) {
|
||||||
virDomainHostdevDefPtr hostdev = def->hostdevs[i];
|
virDomainHostdevDefPtr hostdev = def->hostdevs[i];
|
||||||
virUSBDevicePtr usb;
|
virUSBDevicePtr usb;
|
||||||
@ -423,6 +426,8 @@ static int virLXCCgroupSetupDeviceACL(virDomainDefPtr def,
|
|||||||
VIR_CGROUP_DEVICE_RWM) < 0)
|
VIR_CGROUP_DEVICE_RWM) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
VIR_DEBUG("Device whitelist complete");
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user