提交 461eafec 编写于 作者: L Luyao Huang 提交者: Ján Tomko

lxc: fix starting a domain with a cpuset but no numatune

 # virsh -c lxc:/// start helloworld
 error: Failed to start domain helloworld
 error: internal error: guest failed to start: Invalid value '1-3'
 for 'cpuset.mems': Invalid argument

Free the cpu mask to avoid reusing it as a mem mask
in virCgroupSetCpusetMems
if virDomainNumatuneMaybeFormatNodeset does not set a mask.
Signed-off-by: NLuyao Huang <lhuang@redhat.com>
Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 749ebfd8
...@@ -77,6 +77,8 @@ static int virLXCCgroupSetupCpusetTune(virDomainDefPtr def, ...@@ -77,6 +77,8 @@ static int virLXCCgroupSetupCpusetTune(virDomainDefPtr def,
if (virCgroupSetCpusetCpus(cgroup, mask) < 0) if (virCgroupSetCpusetCpus(cgroup, mask) < 0)
goto cleanup; goto cleanup;
/* free mask to make sure we won't use it in a wrong way later */
VIR_FREE(mask);
} }
if (virDomainNumatuneGetMode(def->numa, -1) != if (virDomainNumatuneGetMode(def->numa, -1) !=
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册