[libvirt] [PATCH] virnetdevbandwidth: Include virutil.h
by Michal Privoznik
One of the latest patches (9a8fc3efc2470) introduced call of
geteuid(). However, not all systems have the function
implemented, e.g. mingw. Therefore, we fail to build on those
system. The fix consist of including virutil.h which defines
geteuid in needed. Sigh.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed under build-breaker rule.
src/util/virnetdevbandwidth.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/util/virnetdevbandwidth.c b/src/util/virnetdevbandwidth.c
index 9f2a159..fbd2a8d 100644
--- a/src/util/virnetdevbandwidth.c
+++ b/src/util/virnetdevbandwidth.c
@@ -28,6 +28,7 @@
#include "viralloc.h"
#include "virerror.h"
#include "virstring.h"
+#include "virutil.h"
#define VIR_FROM_THIS VIR_FROM_NONE
--
2.0.4
10 years
[libvirt] [PATCH 0/2] Fix NUMA compilation issues
by Martin Kletzander
Thanks to Michal who noticed it, I went over the code I reviewed
recently (while my brain was out of order, apparently), and found some
addiitonal issues that this series is trying to fix with the last one
Michal was fixing in his patch (referenced in 1/2).
Martin Kletzander (2):
numa: split util/ and conf/ and support non-contiguous nodesets
numa: fix assumption in virNumaNodeIsAvailable()
src/conf/numatune_conf.c | 24 ++++++++++++++
src/conf/numatune_conf.h | 3 ++
src/libvirt_private.syms | 1 +
src/lxc/lxc_controller.c | 17 +++++++---
src/qemu/qemu_command.c | 2 +-
src/qemu/qemu_process.c | 9 +++++-
src/util/virnuma.c | 82 +++++++++++++++++-------------------------------
src/util/virnuma.h | 7 ++---
tests/qemuxml2argvmock.c | 12 +++++++
9 files changed, 92 insertions(+), 65 deletions(-)
--
2.1.3
10 years
[libvirt] [PATCHv3 0/2] network: bandwidth tuning in session mode revert patch
by Erik Skultety
Erik Skultety (2):
qemu: revert patch - bandwidth tuning in session mode
Iface: disallow network tuning in session mode globally
src/qemu/qemu_command.c | 11 -----------
src/qemu/qemu_driver.c | 9 ---------
src/util/virnetdevbandwidth.c | 8 ++++++++
tests/Makefile.am | 26 +++++++++++++++++++-------
tests/virnetdevbandwidthmock.c | 28 ++++++++++++++++++++++++++++
tests/virnetdevbandwidthtest.c | 2 +-
6 files changed, 56 insertions(+), 28 deletions(-)
create mode 100644 tests/virnetdevbandwidthmock.c
--
1.9.3
10 years
[libvirt] [PATCH] qemu: Update fsfreeze status on domain state transitions
by Michal Privoznik
As of b6d4dad1 (1.2.5) libvirt keeps track if domain disks have been
frozen. However, this falls into that set of information which don't
survive domain restart. Therefore, we need to clear the flag upon some
state transitions. Moreover, once we clear the flag we must update the
status file too.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_driver.c | 10 +++++-----
src/qemu/qemu_process.c | 10 ++++++++++
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 2eaf77d..03c04ce 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4040,11 +4040,6 @@ processGuestPanicEvent(virQEMUDriverPtr driver,
VIR_WARN("Unable to release lease on %s", vm->def->name);
VIR_DEBUG("Preserving lock state '%s'", NULLSTR(priv->lockState));
- if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
- VIR_WARN("Unable to save status on vm %s after state change",
- vm->def->name);
- }
-
switch (action) {
case VIR_DOMAIN_LIFECYCLE_CRASH_COREDUMP_DESTROY:
if (doCoreDumpToAutoDumpPath(driver, vm, VIR_DUMP_MEMORY_ONLY) < 0) {
@@ -4102,6 +4097,11 @@ processGuestPanicEvent(virQEMUDriverPtr driver,
}
cleanup:
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) {
+ VIR_WARN("Unable to save status on vm %s after state change",
+ vm->def->name);
+ }
+
virObjectUnref(cfg);
}
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index ba8ba82..0df375c 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -529,6 +529,7 @@ qemuProcessHandleReset(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
virQEMUDriverPtr driver = opaque;
virObjectEventPtr event;
qemuDomainObjPrivatePtr priv;
+ virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
virObjectLock(vm);
@@ -536,12 +537,20 @@ qemuProcessHandleReset(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
priv = vm->privateData;
if (priv->agent)
qemuAgentNotifyEvent(priv->agent, QEMU_AGENT_EVENT_RESET);
+ /* Clear some domain runtime information. For instance,
+ * fsfreeze won't survive domain reset. This, however,
+ * required the domain status file to be rewritten onto disk. */
+ priv->quiesced = false;
virObjectUnlock(vm);
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
+ VIR_WARN("Failed to save status on vm %s", vm->def->name);
+
if (event)
qemuDomainEventQueue(driver, event);
+ virObjectUnref(cfg);
return 0;
}
@@ -4841,6 +4850,7 @@ void qemuProcessStop(virQEMUDriverPtr driver,
virPortAllocatorRelease(driver->migrationPorts, priv->nbdPort);
priv->nbdPort = 0;
+ priv->quiesced = false;
if (priv->agent) {
qemuAgentClose(priv->agent);
--
2.0.4
10 years
[libvirt] [PATCH 0/2] Enable iothread for virtio-ccw
by Boris Fiuczynski
Commit ef8da2a "qemu: Allow use of iothreads for disk definitions" added
iothread support for disk devices to libvirt.
This patch series fixes a checking logic for virtio-pci and adds virtio-ccw
to the supported disk types.
Boris Fiuczynski (2):
qemu: Correct disk type checking logic for iothreads
qemu: Allow use of iothreads for virtio ccw disk definitions
docs/formatdomain.html.in | 6 ++--
src/qemu/qemu_command.c | 10 +++++--
.../qemuxml2argv-iothreads-disk-virtio-ccw.args | 14 +++++++++
.../qemuxml2argv-iothreads-disk-virtio-ccw.xml | 34 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 2 ++
tests/qemuxml2xmltest.c | 1 +
6 files changed, 61 insertions(+), 6 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-iothreads-disk-virtio-ccw.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-iothreads-disk-virtio-ccw.xml
--
1.9.3
10 years
[libvirt] [PATCH] network: fix call virNetworkEventLifecycleNew when networkStartNetwork fail
by Luyao Huang
When start a network fail, libvirt still call virNetworkEventLifecycleNew
to send a event.
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
src/network/bridge_driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 10ded33..11e86e0 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -3253,7 +3253,8 @@ static int networkCreate(virNetworkPtr net)
if (virNetworkCreateEnsureACL(net->conn, network->def) < 0)
goto cleanup;
- ret = networkStartNetwork(driver, network);
+ if ((ret = networkStartNetwork(driver, network)) < 0)
+ goto cleanup;
event = virNetworkEventLifecycleNew(network->def->name,
network->def->uuid,
--
1.8.3.1
10 years
[libvirt] [PATCH] virsh: fix net-dhcp-leases no output in quiet mode
by Luyao Huang
When run net-dhcp-leases in quiet mode, cannot get
any output.
# virsh -q net-dhcp-leases default
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
tools/virsh-network.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/virsh-network.c b/tools/virsh-network.c
index 4610a34..8f9fbd3 100644
--- a/tools/virsh-network.c
+++ b/tools/virsh-network.c
@@ -1377,10 +1377,10 @@ cmdNetworkDHCPLeases(vshControl *ctl, const vshCmd *cmd)
ignore_value(virAsprintf(&cidr_format, "%s/%d",
lease->ipaddr, lease->prefix));
- vshPrintExtra(ctl, " %-20s %-18s %-9s %-25s %-15s %s\n",
- expirytime, EMPTYSTR(lease->mac),
- EMPTYSTR(typestr), cidr_format,
- EMPTYSTR(lease->hostname), EMPTYSTR(lease->clientid));
+ vshPrint(ctl, " %-20s %-18s %-9s %-25s %-15s %s\n",
+ expirytime, EMPTYSTR(lease->mac),
+ EMPTYSTR(typestr), cidr_format,
+ EMPTYSTR(lease->hostname), EMPTYSTR(lease->clientid));
VIR_FREE(cidr_format);
}
--
1.8.3.1
10 years
[libvirt] [PATCH 0/5] Allow time sync on domain resume
by Michal Privoznik
*** BLURB HERE ***
Michal Privoznik (5):
Introduce virDomainResumeFlags API
Implement virDomainResumeFlags in all drivers
qemu: Split qemuDomainSetTime into two functions
qemuDomainResumeFlags: Introduce VIR_DOMAIN_RESUME_SYNC_TIME
virsh: Implement virDomainResumeFlags
include/libvirt/libvirt-domain.h | 6 +++
src/driver-hypervisor.h | 5 ++
src/esx/esx_driver.c | 14 +++++-
src/hyperv/hyperv_driver.c | 14 +++++-
src/libvirt-domain.c | 44 ++++++++++++++++
src/libvirt_public.syms | 5 ++
src/libxl/libxl_driver.c | 14 +++++-
src/lxc/lxc_driver.c | 15 +++++-
src/openvz/openvz_driver.c | 13 ++++-
src/parallels/parallels_driver.c | 11 +++-
src/phyp/phyp_driver.c | 12 ++++-
src/qemu/qemu_driver.c | 106 ++++++++++++++++++++++++++-------------
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 13 ++++-
src/remote_protocol-structs | 5 ++
src/test/test_driver.c | 13 ++++-
src/vbox/vbox_common.c | 11 +++-
src/vmware/vmware_driver.c | 12 ++++-
src/xen/xen_driver.c | 14 +++++-
src/xenapi/xenapi_driver.c | 21 +++++++-
tools/virsh-domain.c | 13 ++++-
tools/virsh.pod | 10 ++--
22 files changed, 316 insertions(+), 56 deletions(-)
--
2.0.4
10 years
[libvirt] [PATCH] Free job statistics from the migration cookie
by Ján Tomko
==404== 232 bytes in 1 blocks are definitely lost in loss record 669 of 758
==404== at 0x4C2B934: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==404== by 0x52A2BF3: virAlloc (viralloc.c:144)
==404== by 0x1D49AD70: qemuMigrationCookieAddStatistics (qemu_migration.c:554)
==404== by 0x1D49AD70: qemuMigrationBakeCookie (qemu_migration.c:1228)
==404== by 0x1D4A43B8: qemuMigrationFinish (qemu_migration.c:5002)
==404== by 0x1D4C9339: qemuDomainMigrateFinish3Params (qemu_driver.c:11526)
Introduced by commit 5d6fb96
---
src/qemu/qemu_migration.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 94a4cf6..c797206 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -219,6 +219,7 @@ static void qemuMigrationCookieFree(qemuMigrationCookiePtr mig)
VIR_FREE(mig->lockState);
VIR_FREE(mig->lockDriver);
VIR_FREE(mig->nbd);
+ VIR_FREE(mig->jobInfo);
VIR_FREE(mig);
}
--
2.0.4
10 years
[libvirt] [python PATCH] Check return value of libvirt_uintUnwrap
by Jiri Denemark
libvirt_virDomainSendKey didn't check whether libvirt_uintUnwrap
succeeded or not.
https://bugzilla.redhat.com/show_bug.cgi?id=1161039
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
Providing extra context for easier review...
libvirt-override.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libvirt-override.c b/libvirt-override.c
index a53b46f..f496c6e 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -7119,47 +7119,48 @@ static PyObject *
libvirt_virDomainSendKey(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args)
{
PyObject *py_retval;
virDomainPtr domain;
PyObject *pyobj_domain;
PyObject *pyobj_list;
int codeset;
int holdtime;
unsigned int flags;
int ret;
size_t i;
unsigned int keycodes[VIR_DOMAIN_SEND_KEY_MAX_KEYS];
unsigned int nkeycodes;
if (!PyArg_ParseTuple(args, (char *)"OiiOiI:virDomainSendKey",
&pyobj_domain, &codeset, &holdtime, &pyobj_list,
&nkeycodes, &flags)) {
DEBUG("%s failed to parse tuple\n", __FUNCTION__);
return VIR_PY_INT_FAIL;
}
domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain);
if (!PyList_Check(pyobj_list)) {
return VIR_PY_INT_FAIL;
}
if (nkeycodes != PyList_Size(pyobj_list) ||
nkeycodes > VIR_DOMAIN_SEND_KEY_MAX_KEYS) {
return VIR_PY_INT_FAIL;
}
for (i = 0; i < nkeycodes; i++) {
- libvirt_uintUnwrap(PyList_GetItem(pyobj_list, i), &(keycodes[i]));
+ if (libvirt_uintUnwrap(PyList_GetItem(pyobj_list, i), &keycodes[i]) < 0)
+ return VIR_PY_INT_FAIL;
}
LIBVIRT_BEGIN_ALLOW_THREADS;
ret = virDomainSendKey(domain, codeset, holdtime, keycodes, nkeycodes, flags);
LIBVIRT_END_ALLOW_THREADS;
DEBUG("virDomainSendKey ret=%d\n", ret);
py_retval = libvirt_intWrap(ret);
return py_retval;
}
#if LIBVIR_CHECK_VERSION(1, 0, 3)
--
2.1.3
10 years