提交 74e772dd 编写于 作者: O Osier Yang

conf: Do not parse cpuset only if the placement is auto

So that a domain xml which doesn't have "placement" specified, but
"cpuset" is specified, could be parsed. And in this case, the
"placement" mode will be set as "static".
上级 79568df0
......@@ -7896,11 +7896,10 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
}
VIR_FREE(tmp);
} else {
if (def->cpumasklen)
def->placement_mode = VIR_DOMAIN_CPU_PLACEMENT_MODE_STATIC;
def->placement_mode = VIR_DOMAIN_CPU_PLACEMENT_MODE_DEFAULT;
}
if (def->placement_mode == VIR_DOMAIN_CPU_PLACEMENT_MODE_STATIC) {
if (def->placement_mode != VIR_DOMAIN_CPU_PLACEMENT_MODE_AUTO) {
tmp = virXPathString("string(./vcpu[1]/@cpuset)", ctxt);
if (tmp) {
char *set = tmp;
......@@ -7912,6 +7911,8 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
def->cpumasklen) < 0)
goto error;
VIR_FREE(tmp);
if (def->placement_mode == VIR_DOMAIN_CPU_PLACEMENT_MODE_DEFAULT)
def->placement_mode = VIR_DOMAIN_CPU_PLACEMENT_MODE_STATIC;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册