[libvirt] [PATCH 0/3] storage: Clean up some volume wiping code
by Martin Kletzander
Just a cleanup so that some functionality is more readable (about
what's being done for ploop volumes when wiping them) and extensible
in the future. Feel free to NACK if I'm the only one that finds this
more readable.
Martin Kletzander (3):
storage: Move functions around
storage: Use path instead of volume as an argument
storage: Clean up volume wiping
src/storage/storage_backend.c | 193 +++++++++++++++++++++++-------------------
1 file changed, 104 insertions(+), 89 deletions(-)
--
2.9.2
8 years, 3 months
[libvirt] [PATCH] wireshark dissector compile fix
by Benedikt Spranger
Compiling libvirt wireshark dissector on a debian based system failed:
CC wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo
In file included from ../../libvirt/tools/wireshark/src/packet-libvirt.c:27:0:
/usr/include/wireshark/epan/proto.h:40:18: fatal error: glib.h: No such file or directory
compilation terminated.
Makefile:2595: recipe for target 'wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo' failed
Add an explicit dependency to glib.
Benedikt Spranger (1):
wireshark: glib compile fix
m4/virt-wireshark.m4 | 2 ++
tools/Makefile.am | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
--
2.8.1
8 years, 3 months
[libvirt] [PATCH v2] qemu: remove panic dev models s390 and pseries when migrating
by Boris Fiuczynski
The panic devices with models s390 and pseries are autogenerated.
For backwards compatibility reasons the devices are to be removed
when migrating.
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
---
src/qemu/qemu_domain.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index ceac22f..82fa817 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3310,6 +3310,15 @@ qemuDomainDefFormatBuf(virQEMUDriverPtr driver,
virDomainControllerDefFree(usb);
}
+ /* Remove the panic device for selected models if present */
+ for (i = 0; i < def->npanics; i++) {
+ if (def->panics[i]->model == VIR_DOMAIN_PANIC_MODEL_S390 ||
+ def->panics[i]->model == VIR_DOMAIN_PANIC_MODEL_PSERIES) {
+ VIR_DELETE_ELEMENT(def->panics, i, def->npanics);
+ i--;
+ }
+ }
+
for (i = 0; i < def->nchannels; i++)
qemuDomainChrDefDropDefaultPath(def->channels[i], driver);
}
--
2.9.0
8 years, 3 months
[libvirt] [libvirt-glib][PATCH 0/2] Support python3
by Michal Privoznik
/usr/bin/python defaults to python3 on my system. While trying to
build libvirt-glib I've noticed some errors in configure (first
patch), and some missing implementation (second patch).
Michal Privoznik (2):
configure: Detect python in compatible fashion
python: Introduce support for python3
configure.ac | 6 +++---
python/libvirt-glib.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 3 deletions(-)
--
2.8.4
8 years, 3 months
[libvirt] [PATCH 0/2] a couple of schema fixes
by Nikolay Shirokovskiy
Nikolay Shirokovskiy (2):
schema: add missed alias element to memory device
schema: fix resolved interfaces of network type
docs/schemas/domaincommon.rng | 43 +++++++++++++++++++++++++++++++++---------
docs/schemas/network.rng | 5 +----
docs/schemas/networkcommon.rng | 6 ++++++
3 files changed, 41 insertions(+), 13 deletions(-)
--
1.8.3.1
8 years, 3 months
[libvirt] [PATCH v2] qemu: fix domain id after domainCreateWithFlags()
by Sascha Silbe
Ever since virDomainCreateWithFlags() was introduced by de3aadaa
[drivers: add virDomainCreateWithFlags if virDomainCreate exists], the
domain ID retrieved with virDomainGetID() was incorrect for several
drivers after virDomainCreateWithFlags() was called. The API consumer
had to look up the domain anew to retrieve the correct ID.
For the ESX driver, this was fixed in 6139b274 [esx: Update ID after
starting a domain]. For the openvz driver, it was fixed in fd81a097
[openvzDomainCreateWithFlags: set domain id to the correct value]. The
test driver, the OpenNebula driver (removed in the meantime) and the
vbox driver were already updating the domain ID correctly in
domainCreate().
Copy over the ID in qemuDomainCreateWithFlags() to fix this for the qemu
driver, too.
Fixes: de3aadaa ("drivers: add virDomainCreateWithFlags if virDomainCreate exists")
Reported-by: Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
Signed-off-by: Sascha Silbe <silbe(a)linux.vnet.ibm.com>
Tested-by: Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
---
v1→v2:
- Adjusted commit message. remoteDomainCreate() is actually fine since
it explicitly queries the ID in a second RPC, only
remoteDomainCreateWithFlags() is broken. Found and mentioned several
other commits that fixed this for several of the other hypervisor
drivers.
src/qemu/qemu_driver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 1820f85..43242e0 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7100,6 +7100,7 @@ qemuDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
QEMU_ASYNC_JOB_START) < 0)
goto endjob;
+ dom->id = vm->def->id;
ret = 0;
endjob:
--
1.9.1
8 years, 3 months
[libvirt] [PATCH] wireshark: Drop glib dependency
by Michal Privoznik
The only function that we currently use from glib is g_sprintf().
That's a very big gun for such small target. Not only that, but
we've silently relied on wireshark dragging in the glib. Replace
the g_sprintf() with plain sprinf() so that we can drop the glib
dependency.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tools/wireshark/src/packet-libvirt.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/wireshark/src/packet-libvirt.c b/tools/wireshark/src/packet-libvirt.c
index 569a0a1..9eadf4f 100644
--- a/tools/wireshark/src/packet-libvirt.c
+++ b/tools/wireshark/src/packet-libvirt.c
@@ -27,8 +27,6 @@
#include <wireshark/epan/proto.h>
#include <wireshark/epan/packet.h>
#include <wireshark/epan/dissectors/packet-tcp.h>
-#include <glib.h>
-#include <glib/gprintf.h>
#ifdef HAVE_RPC_TYPES_H
# include <rpc/types.h>
#endif
@@ -113,7 +111,7 @@ format_xdr_bytes(guint8 *bytes, guint32 length)
for (i = 0; i < length; i++) {
/* We know that buf has enough size to contain
2 * length + '\0' characters. */
- g_sprintf(buf, "%02x", bytes[i]);
+ sprintf(buf, "%02x", bytes[i]);
buf += 2;
}
return buf - length*2;
--
2.8.4
8 years, 3 months
[libvirt] [PATCH] tests: qemu: Don't leak security manager object
by Peter Krempa
==2064442== 200 (88 direct, 112 indirect) bytes in 1 blocks are definitely lost in loss record 54 of 73
==2064442== at 0x4C2E0F0: calloc (vg_replace_malloc.c:711)
==2064442== by 0x18E75B80: virAllocVar (viralloc.c:560)
==2064442== by 0x18EC43B0: virObjectNew (virobject.c:193)
==2064442== by 0x18EC476E: virObjectLockableNew (virobject.c:219)
==2064442== by 0x1906BC73: virSecurityManagerNewDriver (security_manager.c:93)
==2064442== by 0x1906C076: virSecurityManagerNewStack (security_manager.c:115)
==2064442== by 0x43CC39: qemuTestDriverInit (testutilsqemu.c:548)
==2064442== by 0x4337ED: mymain (qemumonitorjsontest.c:2440)
==2064442== by 0x43BABE: virTestMain (testutils.c:982)
==2064442== by 0x43A490: main (qemumonitorjsontest.c:2558)
---
tests/testutilsqemu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c
index 1cf72a9..133de29 100644
--- a/tests/testutilsqemu.c
+++ b/tests/testutilsqemu.c
@@ -475,6 +475,7 @@ void qemuTestDriverFree(virQEMUDriver *driver)
virObjectUnref(driver->xmlopt);
virObjectUnref(driver->caps);
virObjectUnref(driver->config);
+ virObjectUnref(driver->securityManager);
}
int qemuTestCapsCacheInsert(virQEMUCapsCachePtr cache, const char *binary,
--
2.9.2
8 years, 3 months