提交 824e86e7 编写于 作者: D Daniel P. Berrange

Change VM cgroup suffix from '{lxc,qemu}.libvirt' to 'libvirt-{lxc,qemu}'

Recently we changed to create VM cgroups with the naming pattern
$VMNAME.$DRIVER.libvirt. Following discussions with the systemd
community it was decided that only having a single '.' in the
names is preferrable. So this changes the naming scheme to be
$VMNAME.libvirt-$DRIVER. eg for LXC 'mycontainer.libvirt-lxc' or
for KVM 'myvm.libvirt-qemu'.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 7e77f252
...@@ -1297,7 +1297,7 @@ int virCgroupNewDomainPartition(virCgroupPtr partition, ...@@ -1297,7 +1297,7 @@ int virCgroupNewDomainPartition(virCgroupPtr partition,
int rc; int rc;
char *grpname = NULL; char *grpname = NULL;
if (virAsprintf(&grpname, "%s.%s.libvirt", if (virAsprintf(&grpname, "%s.libvirt-%s",
name, driver) < 0) name, driver) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -362,13 +362,13 @@ static int testCgroupNewForPartitionDomain(const void *args ATTRIBUTE_UNUSED) ...@@ -362,13 +362,13 @@ static int testCgroupNewForPartitionDomain(const void *args ATTRIBUTE_UNUSED)
int ret = -1; int ret = -1;
int rv; int rv;
const char *placement[VIR_CGROUP_CONTROLLER_LAST] = { const char *placement[VIR_CGROUP_CONTROLLER_LAST] = {
[VIR_CGROUP_CONTROLLER_CPU] = "/production/foo.lxc.libvirt", [VIR_CGROUP_CONTROLLER_CPU] = "/production/foo.libvirt-lxc",
[VIR_CGROUP_CONTROLLER_CPUACCT] = "/production/foo.lxc.libvirt", [VIR_CGROUP_CONTROLLER_CPUACCT] = "/production/foo.libvirt-lxc",
[VIR_CGROUP_CONTROLLER_CPUSET] = "/production/foo.lxc.libvirt", [VIR_CGROUP_CONTROLLER_CPUSET] = "/production/foo.libvirt-lxc",
[VIR_CGROUP_CONTROLLER_MEMORY] = "/production/foo.lxc.libvirt", [VIR_CGROUP_CONTROLLER_MEMORY] = "/production/foo.libvirt-lxc",
[VIR_CGROUP_CONTROLLER_DEVICES] = NULL, [VIR_CGROUP_CONTROLLER_DEVICES] = NULL,
[VIR_CGROUP_CONTROLLER_FREEZER] = "/production/foo.lxc.libvirt", [VIR_CGROUP_CONTROLLER_FREEZER] = "/production/foo.libvirt-lxc",
[VIR_CGROUP_CONTROLLER_BLKIO] = "/production/foo.lxc.libvirt", [VIR_CGROUP_CONTROLLER_BLKIO] = "/production/foo.libvirt-lxc",
}; };
if ((rv = virCgroupNewPartition("/production", true, -1, &partitioncgroup)) != 0) { if ((rv = virCgroupNewPartition("/production", true, -1, &partitioncgroup)) != 0) {
...@@ -381,7 +381,7 @@ static int testCgroupNewForPartitionDomain(const void *args ATTRIBUTE_UNUSED) ...@@ -381,7 +381,7 @@ static int testCgroupNewForPartitionDomain(const void *args ATTRIBUTE_UNUSED)
goto cleanup; goto cleanup;
} }
ret = validateCgroup(domaincgroup, "/production/foo.lxc.libvirt", mountsFull, links, placement); ret = validateCgroup(domaincgroup, "/production/foo.libvirt-lxc", mountsFull, links, placement);
cleanup: cleanup:
virCgroupFree(&partitioncgroup); virCgroupFree(&partitioncgroup);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册