vircgroup: Add some VIR_DEBUG statements

These helped with debugging
https://bugzilla.redhat.com/show_bug.cgi?id=1612383

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2019-09-26 15:25:52 -04:00
parent b5290a6e6e
commit a95e585e13
2 changed files with 7 additions and 1 deletions

View File

@ -1157,7 +1157,8 @@ virCgroupNewMachineSystemd(const char *name,
virCgroupFree(&init);
if (!path || STREQ(path, "/") || path[0] != '/') {
VIR_DEBUG("Systemd didn't setup its controller");
VIR_DEBUG("Systemd didn't setup its controller, path=%s",
NULLSTR(path));
return -2;
}

View File

@ -155,6 +155,8 @@ virCgroupV2CopyPlacement(virCgroupPtr group,
const char *path,
virCgroupPtr parent)
{
VIR_DEBUG("group=%p path=%s parent=%p", group, path, parent);
if (path[0] == '/') {
if (VIR_STRDUP(group->unified.placement, path) < 0)
return -1;
@ -200,6 +202,9 @@ virCgroupV2DetectPlacement(virCgroupPtr group,
if (group->unified.placement)
return 0;
VIR_DEBUG("group=%p path=%s controllers=%s selfpath=%s",
group, path, controllers, selfpath);
/* controllers == "" indicates the cgroupv2 controller path */
if (STRNEQ(controllers, ""))
return 0;