提交 135c56e2 编写于 作者: P Peter Krempa

qemu: numa: Don't return automatic nodeset for inactive domain

qemuDomainGetNumaParameters would return the automatic nodeset even for
the persistent config if the domain was running. This is incorrect since
the automatic nodeset will be re-queried upon starting the vm.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1445325
上级 1a4a4ffa
......@@ -9461,6 +9461,8 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
char *nodeset = NULL;
int ret = -1;
virDomainDefPtr def = NULL;
bool live = false;
virBitmapPtr autoNodeset = NULL;
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
VIR_DOMAIN_AFFECT_CONFIG |
......@@ -9473,9 +9475,12 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
if (virDomainGetNumaParametersEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
if (!(def = virDomainObjGetOneDef(vm, flags)))
if (!(def = virDomainObjGetOneDefState(vm, flags, &live)))
goto cleanup;
if (live)
autoNodeset = priv->autoNodeset;
if ((*nparams) == 0) {
*nparams = QEMU_NB_NUMA_PARAM;
ret = 0;
......@@ -9496,8 +9501,7 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
break;
case 1: /* fill numa nodeset here */
nodeset = virDomainNumatuneFormatNodeset(def->numa,
priv->autoNodeset, -1);
nodeset = virDomainNumatuneFormatNodeset(def->numa, autoNodeset, -1);
if (!nodeset ||
virTypedParameterAssign(param, VIR_DOMAIN_NUMA_NODESET,
VIR_TYPED_PARAM_STRING, nodeset) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册