[libvirt] [PATCH 0/2] Adjustments for configuring volume lun device
by John Ferlan
Resolve a couple of issues regarding failures seen configuring a disk
to be a type='volume' device='lun'. The doc patch just indicates that
using an NPIV storage/source pool is a valid option. The second patch
allows for a "clearer" error message to be reported.
John Ferlan (2):
docs: Add Fibre Channel NPIV supported option for volume lun config
conf: Allow error reporting in virDomainDiskSourceIsBlockType
docs/formatdomain.html.in | 6 ++++--
src/conf/domain_conf.c | 21 ++++++++++++++++++---
src/conf/domain_conf.h | 2 +-
src/lxc/lxc_cgroup.c | 2 +-
src/lxc/lxc_driver.c | 6 ++----
src/qemu/qemu_command.c | 5 +----
src/qemu/qemu_conf.c | 6 +++---
7 files changed, 30 insertions(+), 18 deletions(-)
--
2.1.0
9 years, 7 months
[libvirt] [PATCH] tests: extend workaround for gnutls private key loading failure
by Daniel P. Berrange
In gnutls 3.4.3 there is a regression in the loading of private
keys via gnutls_x509_privkey_import. We already have a workaround
to deal with failures on older gnutls, but the error code that
the new gnutls returns is different. Extend the workaround so that
is checks for GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE too.
See also gnutls https://bugzilla.redhat.com/show_bug.cgi?id=1250020
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
tests/virnettlshelpers.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Pushed as a build fix
diff --git a/tests/virnettlshelpers.c b/tests/virnettlshelpers.c
index 6e667d1..531d0b9 100644
--- a/tests/virnettlshelpers.c
+++ b/tests/virnettlshelpers.c
@@ -84,7 +84,8 @@ static gnutls_x509_privkey_t testTLSLoadKey(void)
if ((err = gnutls_x509_privkey_import(key, &data,
GNUTLS_X509_FMT_PEM)) < 0) {
- if (err != GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR) {
+ if (err != GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR &&
+ err != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) {
VIR_WARN("Failed to import key %s", gnutls_strerror(err));
abort();
}
--
2.4.3
9 years, 7 months
[libvirt] [PATCH v2 0/3] Disable floppy disk for PowerPC VMs
by Kothapally Madhu Pavan
This is an attempt to fix:
Libvirt BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1180486
Libvirt currently assumes ISA_based floppy disks to be available across all
architectures and machine types. However, PowerPC Book 3S compatible ('ie pseries)
virtual machines do not support Floppy disks.
This patch series prevents libvirt from launching ppc64[le] -based 'pseries'
VMs with floppy devices.
This version of patch attempts to fulfill the coments of Andrea Bolognani
and Jan Tomko on previous version of patch.
---
Kothapally Madhu Pavan (3):
Caps: Disable floppy disk for PowerPC VM
Avoid starting a PowerPC VM with floppy disk
test: Introduce test case to disallow floppy disk on pseries
src/qemu/qemu_capabilities.c | 15 +++++--
src/qemu/qemu_command.c | 8 ++++
.../qemuxml2argv-disk-floppy-pseries.args | 6 +++
.../qemuxml2argv-disk-floppy-pseries.xml | 41 ++++++++++++++++++++
tests/qemuxml2argvtest.c | 1
5 files changed, 67 insertions(+), 4 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-floppy-pseries.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-floppy-pseries.xml
--
Kothapally Madhu Pavan
9 years, 7 months
[libvirt] [PATCH 00/13] Move generic virsh data to a separate module vsh
by Erik Skultety
The idea behind this is that in order to introduce virt-admin client (and later
some commands/APIs), there are lots of methods in virsh that can be easily
reused by other potential clients like command and command argument passing or
error reporting.
!!! IMPORTANT !!!
These patches cannot be compiled separately, the series is split more or
less logically into chunks only to be more readable by the reviewer.
I started this at least 4 times from scratch and still haven't found a way that
splitting virsh could be done with several independent applicable commits, rather
than having one massive commit in the end.
Erik Skultety (13):
tools: Introduce new client generic module vsh
vsh: Remove client specific data, only generic data are kept
tools: apply s/vshX/virshX to all virsh specific data
virsh: remove generic data, only client specific are kept
virsh: Rename client specific methods in virsh.h
vsh: vshControl now includes client private data and client specific
progname
vsh: Make use of introduced private data
vsh: Introduce client hooks
vsh: Make use of newly introduced client side hooks
vsh: Introduce new global initializer
vsh: Make separated generic methods public
virsh: Introduce connection handler
tools: Update makefile to include 'vsh' sources as well
cfg.mk | 2 +-
po/POTFILES.in | 3 +-
tools/Makefile.am | 4 +
tools/virsh-console.c | 13 +-
tools/virsh-console.h | 8 +-
tools/virsh-domain-monitor.c | 201 ++--
tools/virsh-domain-monitor.h | 4 +-
tools/virsh-domain.c | 532 +++++----
tools/virsh-domain.h | 14 +-
tools/virsh-edit.c | 8 +-
tools/virsh-host.c | 131 ++-
tools/virsh-interface.c | 80 +-
tools/virsh-interface.h | 12 +-
tools/virsh-network.c | 72 +-
tools/virsh-network.h | 10 +-
tools/virsh-nodedev.c | 37 +-
tools/virsh-nwfilter.c | 33 +-
tools/virsh-nwfilter.h | 10 +-
tools/virsh-pool.c | 104 +-
tools/virsh-pool.h | 10 +-
tools/virsh-secret.c | 27 +-
tools/virsh-snapshot.c | 75 +-
tools/virsh-volume.c | 103 +-
tools/virsh-volume.h | 14 +-
tools/virsh.c | 2673 ++++--------------------------------------
tools/virsh.h | 481 +-------
tools/vsh.c | 2332 ++++++++++++++++++++++++++++++++++++
tools/vsh.h | 489 ++++++++
28 files changed, 3906 insertions(+), 3576 deletions(-)
create mode 100644 tools/vsh.c
create mode 100644 tools/vsh.h
--
1.9.3
9 years, 7 months
[libvirt] libvirt 1.2.17 fails
by Jason Helfman
Hello All,
I am getting build failures on the latest build, and it is currently
blocking my commit of the update. Looks like xhtml, is a new build
requirement. I added it to the list of dependencies, however it is failing
to build within our build cluster.
http://meatwad.mouf.net/rubick/poudriere/data/93i386-jgh/2015-07-27_15h41...
(also attached for historical purposes)
I am able to get this to build locally, but trying to distinguish what is
different compared with a clean system.
Here is the listing of files contained in the xhtml package:
xhtml-1.0.20020801_4:
/usr/local/share/xml/dtd/xhtml/catalog.xml
/usr/local/share/xml/dtd/xhtml/xhtml-dcl.soc
/usr/local/share/xml/dtd/xhtml/xhtml-lat1.ent
/usr/local/share/xml/dtd/xhtml/xhtml-special.ent
/usr/local/share/xml/dtd/xhtml/xhtml-symbol.ent
/usr/local/share/xml/dtd/xhtml/xhtml.soc
/usr/local/share/xml/dtd/xhtml/xhtml1-frameset.dtd
/usr/local/share/xml/dtd/xhtml/xhtml1-strict.dtd
/usr/local/share/xml/dtd/xhtml/xhtml1-transitional.dtd
/usr/local/share/xml/dtd/xhtml/xhtml1.dcl
Thanks in advance!
Jason
--
Jason Helfman | FreeBSD Committer
jgh(a)FreeBSD.org | http://people.freebsd.org/~jgh | The Power to Serve
9 years, 7 months
[libvirt] [PATCH v11 0/5] nodeinfo: Add support for subcores
by Andrea Bolognani
Only patch 1/5 has been updated, all the other patches
are the same as v8:
2/5 https://www.redhat.com/archives/libvir-list/2015-July/msg01045.html
3/5 https://www.redhat.com/archives/libvir-list/2015-July/msg01048.html
4/5 https://www.redhat.com/archives/libvir-list/2015-July/msg01049.html
5/5 https://www.redhat.com/archives/libvir-list/2015-July/msg01050.html
I'm including the full history below.
Cheers.
Changes in v11:
* don't declare variables only used inside a code block
guarded by #ifdef outside of said code block
* use virBitmapNextSetBit() instead of going through
all possible index values and calling
virBitmapIsBitSet() for each one
Changes in v10:
* don't attempt to close a file that wasn't opened
* report a detailed error to help with diagnosis
Changes in v9:
* take into account the fact that kvm might not be loaded
or even installed
Changes in v8:
* shortened test names so that make dist doesn't
stop working again
Changes in v7:
* rebased on top of master now that the series this one
builds on have been merged
Changes in v6:
* updated to work on top of
[PATCH v2 00/10] nodeinfo: Various cleanups
Changes in v5:
* streamlined the logic used to decide whether the subcore
configuration is valid and moved it to a separate function
* split the tests into separate commits for easier review and
to hopefully avoid having trouble with the list due to the
message size
Changes in v4:
* removed a printf() statement
* fixed typo in a commit message
Changes in v3:
* the function to get the number of threads per subcore
has been moved to the from virarch.c, which deals with
architecture names only and is therefore not the right
place to read host configuration, to nodeinfo.c where
the rest of this stuff lives
* said function has also been given a shorter name
* the "valid subcore mode" boolean has been removed:
threads_per_subcore will be a positive number if
subcores should be taken into account, and if that's
not the case (x86 host, tainted configuration) it
will simply be zero, so now the code needs to keep
track of a single variable instead of two
* the test case has been renamed to be more
descriptive
* the test data has been cleaned up by removing all
cpu/cpu*/node* links, which prevented 'make dist'
from working due to recursive linking
Andrea Bolognani (3):
tests: Add subcores1 nodeinfo test
tests: Add subcores2 nodeinfo test
tests: Add subcores3 nodeinfo test
Shivaprasad G Bhat (2):
nodeinfo: Fix output on PPC64 KVM hosts
tests: Prepare for subcore tests
src/libvirt_private.syms | 1 +
src/nodeinfo.c | 153 ++++++++++++++++++++-
src/nodeinfo.h | 1 +
tests/Makefile.am | 6 +
[...]
tests/nodeinfomock.c | 35 +++++
tests/nodeinfotest.c | 8 +-
1348 files changed, 2134 insertions(+), 6 deletions(-)
[...]
create mode 100644 tests/nodeinfomock.c
--
2.4.3
9 years, 7 months
[libvirt] [PATCH] nodeinfo: Fix build failure when KVM headers are not available
by Andrea Bolognani
Compiler error:
../../src/nodeinfo.c: In function 'nodeGetThreadsPerSubcore':
../../src/nodeinfo.c:2393: error: label 'out' defined but not used [-Wunused-label]
../../src/nodeinfo.c:2352: error: unused parameter 'arch' [-Wunused-parameter]
---
src/nodeinfo.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index 7da055c..6ccada5 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -2341,6 +2341,8 @@ nodeAllocPages(unsigned int npages,
return ret;
}
+#if HAVE_LINUX_KVM_H && defined(KVM_CAP_PPC_SMT)
+
/* Get the number of threads per subcore.
*
* This will be 2, 4 or 8 on POWER hosts, depending on the current
@@ -2352,8 +2354,6 @@ int
nodeGetThreadsPerSubcore(virArch arch)
{
int threads_per_subcore = 0;
-
-#if HAVE_LINUX_KVM_H && defined(KVM_CAP_PPC_SMT)
const char *kvmpath = "/dev/kvm";
int kvmfd;
@@ -2388,8 +2388,19 @@ nodeGetThreadsPerSubcore(virArch arch)
VIR_FORCE_CLOSE(kvmfd);
}
-#endif /* HAVE_LINUX_KVM_H && defined(KVM_CAP_PPC_SMT) */
out:
return threads_per_subcore;
}
+
+#else
+
+/* Fallback for nodeGetThreadsPerSubcore() used when KVM headers
+ * are not available on the system */
+int
+nodeGetThreadsPerSubcore(virArch arch ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+
+#endif /* HAVE_LINUX_KVM_H && defined(KVM_CAP_PPC_SMT) */
--
2.4.3
9 years, 7 months
[libvirt] [PATCH] qemu: Remove double unlock for domains
by Martin Kletzander
The virDomainObjListRemove() function unlocks a domain that it's given
due to legacy code. And because of that code, which should be
refactored, that last virObjectUnlock() cannot be just removed. So
instead, lock it right back for qemu for now. All calls to
qemuDomainRemoveInactive() are followed by code that unlocks the domain
again, plus the domain should be locked during qemuDomainObjEndJob(), so
the right place to lock it is right after virDomainObjListRemove().
The only place where this would cause a problem is the autodestroy
callback, so we need to get another reference there and uref+unlock it
afterwards. Luckily, returning NULL from that function doesn't mean an
error, and only means that it doesn't need to be unlocked anymore.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/qemu/qemu_domain.c | 7 +++++++
src/qemu/qemu_process.c | 7 ++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 8b050a043995..d6d723112638 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2593,6 +2593,13 @@ qemuDomainRemoveInactive(virQEMUDriverPtr driver,
virObjectRef(vm);
virDomainObjListRemove(driver->domains, vm);
+ /*
+ * virDomainObjListRemove() leaves the domain unlocked so it can
+ * be unref'd for other drivers that depend on that, but we still
+ * need to reset a job and we have a reference from the API that
+ * called this function. So we need to lock it back.
+ */
+ virObjectLock(vm);
virObjectUnref(cfg);
if (haveJob)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 1c0c734c3811..df38dacdca92 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -5696,6 +5696,8 @@ qemuProcessAutoDestroy(virDomainObjPtr dom,
VIR_DEBUG("vm=%s, conn=%p", dom->def->name, conn);
+ virObjectRef(dom);
+
if (priv->job.asyncJob) {
VIR_DEBUG("vm=%s has long-term job active, cancelling",
dom->def->name);
@@ -5718,15 +5720,14 @@ qemuProcessAutoDestroy(virDomainObjPtr dom,
qemuDomainObjEndJob(driver, dom);
- if (!dom->persistent) {
+ if (!dom->persistent)
qemuDomainRemoveInactive(driver, dom);
- dom = NULL;
- }
if (event)
qemuDomainEventQueue(driver, event);
cleanup:
+ virDomainObjEndAPI(&dom);
return dom;
}
--
2.4.5
9 years, 7 months
[libvirt] [PATCH 0/2] qemu: Improve memory alignment handling and fix upcoming powerpc
by Peter Krempa
Peter Krempa (2):
qemu: Make memory alignment helper more universal
qemu: ppc64: Align memory sizes to 256MiB
src/qemu/qemu_domain.c | 33 ++++++++++++++++------
src/qemu/qemu_domain.h | 3 +-
src/qemu/qemu_hotplug.c | 4 +--
.../qemuxml2argv-pseries-cpu-compat.args | 2 +-
4 files changed, 30 insertions(+), 12 deletions(-)
--
2.4.5
9 years, 7 months
[libvirt] ambiguous ret of qemuDomainDetachVirtioDiskDevice
by zhang bo
static int
qemuDomainDetachVirtioDiskDevice(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainDiskDefPtr detach)
{
.......
rc = qemuDomainWaitForDeviceRemoval(vm);
if (rc == 0 || rc == 1)
ret = qemuDomainRemoveDiskDevice(driver, vm, detach);
else
ret = 0; /*the return value of 2 is dismissed here, which refers to ETIMEOUT.*/
........
}
------------------------------------
If it timeouts when qemu tries to del the device, the return value would be modified from 2 to 0 in
function qemuDomainDetachVirtioDiskDevice(), which means that, the users would be misleaded that
the device has been deleted, however, the device maybe probably failed to be detached after timeout and
still in use.
That is to say, the function qemuDomainDetachVirtioDiskDevice()'s return value is ambiguous when it's 0,
maybe successful, or timeout. Will it be better to pass ETIMEOUT to user? or any other advises? for example,
let users themselves dumpxml the guest to check whether the device has been actually detached or not?
--
Oscar
oscar.zhangbo(a)huawei.com
9 years, 7 months