From: Luyao Huang Date: Thu, 19 Mar 2015 10:13:04 +0000 (+0800) Subject: conf: fix parsing of NUMA settings in VM status XML X-Git-Tag: v1.2.13.1~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28575e750f0e91692709d0890176c5f688c0124a;p=thirdparty%2Flibvirt.git conf: fix parsing of NUMA settings in VM status XML Commit 5bba61f changed the XPath strings to be absolute when parsing the VM NUMA configuration. Unfortunately the element is not a top level element when parsing the domain status XML thus the absolute XPath string doesn't match. Use the relative string so that the settings are not lost. Signed-off-by: Luyao Huang (cherry picked from commit d75e23bbfb92793ac6828a6eff6d909c5f92cc9b) --- diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c index 9caa655aca..1da8d6c528 100644 --- a/src/conf/numa_conf.c +++ b/src/conf/numa_conf.c @@ -663,10 +663,10 @@ virDomainNumaDefCPUParseXML(virDomainNumaPtr def, int ret = -1; /* check if NUMA definition is present */ - if (!virXPathNode("/domain/cpu/numa[1]", ctxt)) + if (!virXPathNode("./cpu/numa[1]", ctxt)) return 0; - if ((n = virXPathNodeSet("/domain/cpu/numa[1]/cell", ctxt, &nodes)) <= 0) { + if ((n = virXPathNodeSet("./cpu/numa[1]/cell", ctxt, &nodes)) <= 0) { virReportError(VIR_ERR_XML_ERROR, "%s", _("NUMA topology defined without NUMA cells")); goto cleanup;