mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
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: Luyao Huang <lhuang@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
749ebfd8f8
commit
461eafecfa
@ -77,6 +77,8 @@ static int virLXCCgroupSetupCpusetTune(virDomainDefPtr def,
|
||||
|
||||
if (virCgroupSetCpusetCpus(cgroup, mask) < 0)
|
||||
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) !=
|
||||
|
Loading…
Reference in New Issue
Block a user