[libvirt] [PATCH] doc/Makefile.am: Add checking of XHTML1 DTD.
by taget@linux.vnet.ibm.com
From: Eli Qiao <taget(a)linux.vnet.ibm.com>
When generating html from html.in, even not install xhtml1-dtds.noarch, make will not return a error.
which will lead 'make install' failed.
This patch return error when creating html doc when doning make, will give user a correct error message.
Signed-off-by: Eli Qiao <taget(a)linux.vnet.ibm.com>
---
docs/Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 9de3406..bc42353 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -223,7 +223,7 @@ internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
SGML_CATALOG_FILES='$(XML_CATALOG_FILE)' \
$(XMLLINT) --catalogs --nonet --format --valid $< > $(srcdir)/$@ \
|| { rm $(srcdir)/$@ && exit 1; }; \
- else echo "missing XHTML1 DTD" ; fi ; fi
+ else echo "missing XHTML1 DTD" && exit 1; fi ; fi
%.php.tmp: %.php.in site.xsl page.xsl sitemap.html.in
@if [ -x $(XSLTPROC) ] ; then \
@@ -249,7 +249,7 @@ html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
> /dev/null ; then \
SGML_CATALOG_FILES='$(XML_CATALOG_FILE)' \
$(XMLLINT) --catalogs --nonet --valid --noout $(srcdir)/html/*.html ; \
- else echo "missing XHTML1 DTD" ; fi ; fi
+ else echo "missing XHTML1 DTD" && exit 1; fi ; fi
$(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
--
1.8.3.1
10 years, 11 months
[libvirt] question about libvirt.spec
by Jim Fehlig
While installing a libvirt-daemon package build from a slightly modified
upstream spec file (e.g. fedora and rhel replaced with suse_version and
sles_version), I noticed warnings such as "warning: user qemu does not
exist - using root".
%files of libvirt-daemon has several hypervisor-specific files and
directories, e.g.
%dir %attr(0750, %{qemu_user}, %{qemu_group}) ...
but afaict libvirt-daemon has no dependency on a package that creates
the qemu user:group (e.g. qemu or qemu-kvm).
I thought about moving hypervisor-specific files to the
libvirt-daemon-driver-<hypervisor> packages, but have a hunch they are
in the libvirt-daemon package for a reason I'm not considering. Should
these files and directories be moved to their respective
libvirt-daemon-driver-<hypervisor> packages, making libvirt-daemon more
hypervisor-neutral?
Regards,
Jim
10 years, 11 months
[libvirt] [PATCH] src: Align make output
by Michal Privoznik
The make inserts six spaces instead of four:
GEN access/viraccessapichecklxc.h
GEN hyperv/hyperv_wmi.generated.h
GEN access/viraccessapichecklxc.c
GEN hyperv/hyperv_wmi.generated.c
GEN hyperv/hyperv_wmi_classes.generated.typedef
GEN hyperv/hyperv_wmi_classes.generated.h
GEN hyperv/hyperv_wmi_classes.generated.c
GEN libvirt_access_qemu.xml
GEN libvirt_access.syms
GEN libvirt_access_lxc.xml
GEN libvirt_access_qemu.syms
GEN libvirt_access_lxc.syms
GEN libvirt_qemu.def
GEN esx/esx_vi_types.generated.typedef
GEN esx/esx_vi_types.generated.typeenum
GEN esx/esx_vi_types.generated.typetostring
GEN esx/esx_vi_types.generated.typefromstring
GEN esx/esx_vi_types.generated.h
GEN esx/esx_vi_types.generated.c
GEN esx/esx_vi_methods.generated.h
GEN esx/esx_vi_methods.generated.c
GEN esx/esx_vi_methods.generated.macro
GEN esx/esx_vi.generated.h
GEN esx/esx_vi.generated.c
GEN libvirt_lxc.def
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/esx/esx_vi_generator.py | 4 ++--
src/hyperv/hyperv_wmi_generator.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_vi_generator.py
index 547eef6..0b75f18 100755
--- a/src/esx/esx_vi_generator.py
+++ b/src/esx/esx_vi_generator.py
@@ -1321,9 +1321,9 @@ def is_known_type(type):
def open_and_print(filename):
if filename.startswith("./"):
- print " GEN " + filename[2:]
+ print " GEN " + filename[2:]
else:
- print " GEN " + filename
+ print " GEN " + filename
return open(filename, "wb")
diff --git a/src/hyperv/hyperv_wmi_generator.py b/src/hyperv/hyperv_wmi_generator.py
index 0c5d496..f767d54 100755
--- a/src/hyperv/hyperv_wmi_generator.py
+++ b/src/hyperv/hyperv_wmi_generator.py
@@ -193,9 +193,9 @@ class Property:
def open_and_print(filename):
if filename.startswith("./"):
- print " GEN " + filename[2:]
+ print " GEN " + filename[2:]
else:
- print " GEN " + filename
+ print " GEN " + filename
return open(filename, "wb")
--
1.8.4.4
10 years, 11 months
[libvirt] [PATCHv1.5 00/27] Gluster snapshot support (RFC) and refactors
by Peter Krempa
This version was rebased on top of Eric's gluster pool series and a few
small mistakes were fixed. As nobody actually reviewed the original posting
I did not bother putting the differences in the patches.
Peter Krempa (27):
conf: Export virStorageVolType enum helper functions
test: Implement fake storage pool driver in qemuxml2argv test
qemuxml2argv: Add test to verify correct usage of disk type="volume"
qemuxml2argv: Add test for disk type='volume' with iSCSI pools
qemu: Split out formatting of network disk source URI
qemu: Simplify call pattern of qemuBuildDriveURIString
qemu: Use qemuBuildNetworkDriveURI to handle http/ftp and friends
qemu: Migrate sheepdog source generation into common function
qemu: Split out NBD command generation
qemu: Unify formatting of RBD sources
qemu: Refactor disk source string formatting
conf: Support disk source formatting without needing a
virDomainDiskDefPtr
conf: Clean up virDomainDiskSourceDefFormatInternal
conf: Split out seclabel formating code for disk source
conf: Export disk source formatter and parser
snapshot: conf: Use common parsing and formatting functions for source
snapshot: conf: Fix NULL dereference when <driver> element is empty
conf: Add functions to copy and free network disk source definitions
qemu: snapshot: Detect internal snapshots also for sheepdog and RBD
conf: Add helper do clear disk source authentication struct
qemu: Clear old translated pool source
qemu: snapshot: Touch up error message
qemu: snapshot: Add functions similar to disk source pool translation
qemu: snapshots: Declare supported and unsupported snapshot configs
RFC: snapshot: Add support for specifying snapshot disk backing type
RFC: conf: snapshot: Parse more snapshot information
RFC: qemu: snapshot: Add support for external active snapshots on
gluster
src/conf/domain_conf.c | 261 ++++++---
src/conf/domain_conf.h | 25 +
src/conf/snapshot_conf.c | 69 ++-
src/conf/snapshot_conf.h | 14 +-
src/libvirt_private.syms | 6 +
src/qemu/qemu_command.c | 652 +++++++++++----------
src/qemu/qemu_command.h | 15 +
src/qemu/qemu_conf.c | 156 +++--
src/qemu/qemu_conf.h | 8 +
src/qemu/qemu_driver.c | 429 ++++++++++++--
.../qemuxml2argv-disk-source-pool-mode.args | 10 +
.../qemuxml2argv-disk-source-pool-mode.xml | 4 +-
.../qemuxml2argv-disk-source-pool.args | 8 +
.../qemuxml2argv-disk-source-pool.xml | 2 +-
tests/qemuxml2argvtest.c | 166 ++++++
15 files changed, 1298 insertions(+), 527 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.args
--
1.8.4.3
10 years, 11 months
[libvirt] [libvirt-python] Use user requested python binary for setup.py
by Doug Goldstein
When setup.py is kicked off with a python interpreter other than the
system 'python', (e.g. python2.7 setup.py build) the build process would
switch to 'python' and not use python2.7 as requested by the user. We
should always respect the user requested python interpreter and use it.
---
setup.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/setup.py b/setup.py
index ecbce1f..24d4cf2 100755
--- a/setup.py
+++ b/setup.py
@@ -122,10 +122,10 @@ class my_build(build):
def run(self):
apis = get_api_xml_files()
- self.spawn(["python", "generator.py", "libvirt", apis[0]])
- self.spawn(["python", "generator.py", "libvirt-qemu", apis[1]])
+ self.spawn([sys.executable, "generator.py", "libvirt", apis[0]])
+ self.spawn([sys.executable, "generator.py", "libvirt-qemu", apis[1]])
if have_libvirt_lxc:
- self.spawn(["python", "generator.py", "libvirt-lxc", apis[2]])
+ self.spawn([sys.executable, "generator.py", "libvirt-lxc", apis[2]])
build.run(self)
@@ -267,7 +267,7 @@ class my_test(Command):
apis = get_api_xml_files()
- self.spawn(["python", "sanitytest.py", self.build_platlib, apis[0]])
+ self.spawn([sys.executable, "sanitytest.py", self.build_platlib, apis[0]])
class my_clean(clean):
--
1.8.3.2
10 years, 11 months
[libvirt] [PATCH python] Fix use of virDomainEventRegister in python bindings
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
If an app used the virDomainEventRegister binding instead
of the virDomainEventRegisterAny binding, it would never
have its callback invoked. This is because the code for
dispatching from the C libvirt_virConnectDomainEventCallback
method was totally fubar.
If DEBUG macro was set in the python build the error would
become visible
"libvirt_virConnectDomainEventCallback dom_class is not a class!"
The code in libvirt_virConnectDomainEventCallback was
inexplicably complex and has apparently never worked. The
fix is to write it the same way as the other callback handlers.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
libvirt-override-virConnect.py | 2 +-
libvirt-override.c | 64 ++++--------------------------------------
2 files changed, 6 insertions(+), 60 deletions(-)
diff --git a/libvirt-override-virConnect.py b/libvirt-override-virConnect.py
index 23fadfd..0beaf9c 100644
--- a/libvirt-override-virConnect.py
+++ b/libvirt-override-virConnect.py
@@ -38,7 +38,7 @@
"""
try:
for cb,opaque in self.domainEventCallbacks.items():
- cb(self,dom,event,detail,opaque)
+ cb(self, virDomain(self, _obj=dom), event, detail, opaque)
return 0
except AttributeError:
pass
diff --git a/libvirt-override.c b/libvirt-override.c
index 93b9c5f..5deb414 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -4923,7 +4923,6 @@ cleanup:
*******************************************/
static PyObject *libvirt_module = NULL;
static PyObject *libvirt_dict = NULL;
-static PyObject *libvirt_dom_class = NULL;
static PyObject *
getLibvirtModuleObject(void) {
@@ -4959,23 +4958,6 @@ getLibvirtDictObject(void) {
return libvirt_dict;
}
-static PyObject *
-getLibvirtDomainClassObject(void) {
- if (libvirt_dom_class)
- return libvirt_dom_class;
-
- // PyDict_GetItemString returns a borrowed reference
- libvirt_dom_class = PyDict_GetItemString(getLibvirtDictObject(),
- "virDomain");
- if (!libvirt_dom_class) {
- DEBUG("%s Error importing virDomain class\n", __FUNCTION__);
- PyErr_Print();
- return NULL;
- }
-
- Py_INCREF(libvirt_dom_class);
- return libvirt_dom_class;
-}
static PyObject *
libvirt_lookupPythonFunc(const char *funcname)
@@ -5013,13 +4995,9 @@ libvirt_virConnectDomainEventCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
{
PyObject *pyobj_ret;
- PyObject *pyobj_conn_inst = (PyObject*)opaque;
+ PyObject *pyobj_conn = (PyObject*)opaque;
PyObject *pyobj_dom;
- PyObject *pyobj_dom_args;
- PyObject *pyobj_dom_inst;
-
- PyObject *dom_class;
int ret = -1;
LIBVIRT_ENSURE_THREAD_STATE;
@@ -5027,45 +5005,15 @@ libvirt_virConnectDomainEventCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
/* Create a python instance of this virDomainPtr */
virDomainRef(dom);
pyobj_dom = libvirt_virDomainPtrWrap(dom);
- pyobj_dom_args = PyTuple_New(2);
- if (PyTuple_SetItem(pyobj_dom_args, 0, pyobj_conn_inst) != 0) {
- DEBUG("%s error creating tuple", __FUNCTION__);
- goto cleanup;
- }
- if (PyTuple_SetItem(pyobj_dom_args, 1, pyobj_dom) != 0) {
- DEBUG("%s error creating tuple", __FUNCTION__);
- goto cleanup;
- }
- Py_INCREF(pyobj_conn_inst);
-
- dom_class = getLibvirtDomainClassObject();
- if (!PyClass_Check(dom_class)) {
- DEBUG("%s dom_class is not a class!\n", __FUNCTION__);
- goto cleanup;
- }
-
- pyobj_dom_inst = PyInstance_New(dom_class,
- pyobj_dom_args,
- NULL);
-
- Py_DECREF(pyobj_dom_args);
-
- if (!pyobj_dom_inst) {
- DEBUG("%s Error creating a python instance of virDomain\n",
- __FUNCTION__);
- PyErr_Print();
- goto cleanup;
- }
/* Call the Callback Dispatcher */
- pyobj_ret = PyObject_CallMethod(pyobj_conn_inst,
+ pyobj_ret = PyObject_CallMethod(pyobj_conn,
(char*)"_dispatchDomainEventCallbacks",
(char*)"Oii",
- pyobj_dom_inst,
- event,
- detail);
+ pyobj_dom,
+ event, detail);
- Py_DECREF(pyobj_dom_inst);
+ Py_DECREF(pyobj_dom);
if (!pyobj_ret) {
DEBUG("%s - ret:%p\n", __FUNCTION__, pyobj_ret);
@@ -5075,8 +5023,6 @@ libvirt_virConnectDomainEventCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
ret = 0;
}
-
-cleanup:
LIBVIRT_RELEASE_THREAD_STATE;
return ret;
}
--
1.8.3.1
10 years, 11 months
[libvirt] [PATCH] daemon: Run virStateCleanup conditionally
by Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1033061
Currently, initialization of drivers is done in a separate thread. This
is done for several reasons: a driver that is initialized may require
running event loop, it may take ages to initialize driver (e.g. due to
autostarting domains). While the thread is spawn and run, the main()
continues its execution. However, if something goes bad, or the event
loop is just exited (e.g. due to a --timeout or SIGINT) we try to
cleanup all the drivers. So we have two threads running Initialize() and
Cleanup() concurrently. This may result in accessing stale pointers -
e.g. netcf driver will free() itself in stateCleanup callback, while the
init thread may come, open a dummy connection in order to autostart some
domains and voilà: do_open() iterates over interface drivers and
accesses stale netcf driver.
The fix consists in not running stateCleanup if the init thread is still
running.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
daemon/libvirtd.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index aef1546..49c42ad 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -108,6 +108,8 @@ virNetServerProgramPtr remoteProgram = NULL;
virNetServerProgramPtr qemuProgram = NULL;
virNetServerProgramPtr lxcProgram = NULL;
+volatile bool driversInitialized = false;
+
enum {
VIR_DAEMON_ERR_NONE = 0,
VIR_DAEMON_ERR_PIDFILE,
@@ -912,6 +914,8 @@ static void daemonRunStateInit(void *opaque)
goto cleanup;
}
+ driversInitialized = true;
+
#ifdef HAVE_DBUS
/* Tie the non-priviledged libvirtd to the session/shutdown lifecycle */
if (!virNetServerIsPrivileged(srv)) {
@@ -1546,7 +1550,8 @@ cleanup:
daemonConfigFree(config);
- virStateCleanup();
+ if (driversInitialized)
+ virStateCleanup();
return ret;
}
--
1.8.4.4
10 years, 11 months
[libvirt] [PATCH] qemu: report error on attempt to live change virtio-net queues
by Laine Stump
This resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1029732
The BZ asked for the capability to change the number of queues used by
a virtio-net device while the device is in use. Because the number of
queues can only be set at the time the device is created, that isn't
possible. However, libvirt also shouldn't be silently reporting
success when someone tries to change the number of queues. So this
patch flags that as an error (just as attempts to change any of the
other virtio-specific parameters already do).
---
src/qemu/qemu_hotplug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 649c884..c136232 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1899,7 +1899,8 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
(olddev->driver.virtio.name != newdev->driver.virtio.name ||
olddev->driver.virtio.txmode != newdev->driver.virtio.txmode ||
olddev->driver.virtio.ioeventfd != newdev->driver.virtio.ioeventfd ||
- olddev->driver.virtio.event_idx != newdev->driver.virtio.event_idx)) {
+ olddev->driver.virtio.event_idx != newdev->driver.virtio.event_idx ||
+ olddev->driver.virtio.queues != newdev->driver.virtio.queues)) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot modify virtio network device driver attributes"));
goto cleanup;
--
1.8.4.2
10 years, 11 months
[libvirt] [PATCH v3] Pin guest to memory node on NUMA system
by Shivaprasad G Bhat
Version 3:
Addressed comments on V2.
Version 2:
Fixed the string formatting errors in v1.
The patch contains the fix for defect 1009880 reported at redhat bugzilla.
The root cause is, ever since the subcpusets(vcpu,emulator) were introduced, the
parent cpuset cannot be modified to remove the nodes that are in use by the
subcpusets.
The fix is to break the memory node modification into three steps as to assign
new nodes into the parent first. Change the nodes in the child nodes. Then
remove the old nodes on the parent node.
Signed-off-by: Shivaprasad G Bhat <sbhat(a)linux.vnet.ibm.com>
---
src/qemu/qemu_driver.c | 115 ++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 110 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 8a1eefd..4bc9d1d 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -8132,6 +8132,47 @@ cleanup:
}
static int
+qemuSetVcpuCpusetMems(virDomainObjPtr vm,
+ char *nodeset_str)
+{
+ size_t j = 0;
+ qemuDomainObjPrivatePtr priv = vm->privateData;
+ virCgroupPtr cgroup_vcpu = NULL;
+
+ for (j = 0; j < priv->nvcpupids; j++) {
+ if (virCgroupNewVcpu(priv->cgroup, j, false, &cgroup_vcpu) < 0) {
+ return -1;
+ }
+ if (virCgroupSetCpusetMems(cgroup_vcpu, nodeset_str) < 0) {
+ virCgroupFree(&cgroup_vcpu);
+ return -1;
+ }
+ virCgroupFree(&cgroup_vcpu);
+ }
+
+ return 0;
+}
+
+static int
+qemuSetEmulatorCpusetMems(virDomainObjPtr vm,
+ char *nodeset_str)
+{
+ qemuDomainObjPrivatePtr priv = vm->privateData;
+ virCgroupPtr cgroup_emulator = NULL;
+
+ if (virCgroupNewEmulator(priv->cgroup, false, &cgroup_emulator) < 0) {
+ return -1;
+ }
+ if (virCgroupSetCpusetMems(cgroup_emulator, nodeset_str) < 0) {
+ virCgroupFree(&cgroup_emulator);
+ return -1;
+ }
+ virCgroupFree(&cgroup_emulator);
+
+ return 0;
+}
+
+static int
qemuDomainSetNumaParameters(virDomainPtr dom,
virTypedParameterPtr params,
int nparams,
@@ -8198,7 +8239,11 @@ qemuDomainSetNumaParameters(virDomainPtr dom,
}
} else if (STREQ(param->field, VIR_DOMAIN_NUMA_NODESET)) {
virBitmapPtr nodeset = NULL;
+ virBitmapPtr old_nodeset = NULL;
+ virBitmapPtr temp_nodeset = NULL;
char *nodeset_str = NULL;
+ char *old_nodeset_str = NULL;
+ char *temp_nodeset_str = NULL;
if (virBitmapParse(params[i].value.s,
0, &nodeset,
@@ -8208,32 +8253,92 @@ qemuDomainSetNumaParameters(virDomainPtr dom,
}
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
+ size_t j;
+
if (vm->def->numatune.memory.mode !=
VIR_DOMAIN_NUMATUNE_MEM_STRICT) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("change of nodeset for running domain "
"requires strict numa mode"));
- virBitmapFree(nodeset);
ret = -1;
- continue;
+ goto next;
}
/* Ensure the cpuset string is formated before passing to cgroup */
if (!(nodeset_str = virBitmapFormat(nodeset))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Failed to format nodeset"));
- virBitmapFree(nodeset);
ret = -1;
- continue;
+ goto next;
+ }
+
+ /*Get Exisitng nodeset values */
+ if (virCgroupGetCpusetMems(priv->cgroup, &old_nodeset_str) < 0) {
+ ret = -1;
+ goto next;
+ }
+ if (virBitmapParse(old_nodeset_str, 0, &old_nodeset,
+ VIR_DOMAIN_CPUMASK_LEN) < 0){
+ ret = -1;
+ goto next;
+ }
+
+ /* Merge the existing and new nodeset values */
+ if ((temp_nodeset = virBitmapNewCopy(old_nodeset)) == NULL) {
+ ret = -1;
+ goto next;
+ }
+
+ for (j = 0; j < caps->host.nnumaCell; j++) {
+ bool result;
+ if (virBitmapGetBit(nodeset, j, &result) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Failed to get cpuset bit values"));
+ ret = -1;
+ goto next;
+ }
+ if (result && (virBitmapSetBit(temp_nodeset, j) < 0)) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Failed to set temporary cpuset bit values"));
+ ret = -1;
+ goto next;
+ }
+ }
+
+ if (!(temp_nodeset_str = virBitmapFormat(temp_nodeset))) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Failed to format nodeset"));
+ ret = -1;
+ goto next;
+ }
+
+ if (virCgroupSetCpusetMems(priv->cgroup, temp_nodeset_str) < 0) {
+ ret = -1;
+ goto next;
+ }
+
+ if (qemuSetVcpuCpusetMems(vm, nodeset_str) ||
+ qemuSetEmulatorCpusetMems(vm, nodeset_str)) {
+ ret = -1;
+ goto next;
}
if (virCgroupSetCpusetMems(priv->cgroup, nodeset_str) < 0) {
virBitmapFree(nodeset);
VIR_FREE(nodeset_str);
ret = -1;
- continue;
+ goto next;
}
+next :
VIR_FREE(nodeset_str);
+ VIR_FREE(old_nodeset_str);
+ virBitmapFree(old_nodeset);
+ VIR_FREE(temp_nodeset_str);
+ virBitmapFree(temp_nodeset);
+ if (ret) {
+ virBitmapFree(nodeset);
+ continue;
+ }
/* update vm->def here so that dumpxml can read the new
* values from vm->def. */
10 years, 11 months