mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
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 (cherry picked from commit 135c56e2b876e4cdf8d96de85b32bea3f10d81ce)
This commit is contained in:
parent
13bc6424d4
commit
796d0c1227
@ -9467,6 +9467,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 |
|
||||
@ -9479,9 +9481,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;
|
||||
@ -9502,8 +9507,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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user