[libvirt] [PATCH 0/2] Add function for XML yes|no string handling
by Shotaro Gotanda
These patches are based on a bite-sized task proposed in
https://wiki.libvirt.org/page/BiteSizedTasks
and the mentor of this bite-sized task is Cole Robinson
<crobinso(a)redhat.com>
(Do I need to put the mentor in cc, in this case?)
The function virStringParseYesNo() convert the string "yes" into bool
true and "no" into false, and error if we receive anything other than
those values.
To be honest, I'm not confident on the error handling in libvirt.
So, please check that point.
Regards,
Shotaro
Shotaro Gotanda (2):
util: add virStringParseYesNo()
conf: Use virStringParseYesNo()
src/conf/domain_conf.c | 30 +++++-------------------------
src/conf/secret_conf.c | 12 ++----------
src/util/virstring.c | 32 ++++++++++++++++++++++++++++++++
src/util/virstring.h | 3 +++
4 files changed, 42 insertions(+), 35 deletions(-)
--
2.19.1
5 years, 8 months
[libvirt] [PATCH python v2] Fix handling of optional params in blockCopy()
by Nir Soffer
Commit 2b4bd07e0a22 (Add check for params, nparams being a dictionary)
changed the way the optional params argument is treated. If
libvirt.virDomain.blockCopy() is called without specifying params,
params is None, and the call will fail with:
TypeError: block params must be a dictionary
This is wrong as params is defined as kwarg, breaking existing libvirt
users like oVirt. Add a check for Py_None, so we accept either a dict or
None and fail with TypeError with anything else.
Resolves: https://bugzilla.redhat.com/1687114
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
libvirt-override.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt-override.c b/libvirt-override.c
index 857c018..c5e2908 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -8835,11 +8835,11 @@ libvirt_virDomainBlockCopy(PyObject *self ATTRIBUTE_UNUSED,
if (virPyDictToTypedParams(pyobj_dict, ¶ms, &nparams,
virPyDomainBlockCopyParams,
VIR_N_ELEMENTS(virPyDomainBlockCopyParams)) < 0) {
return NULL;
}
- } else {
+ } else if (pyobj_dict != Py_None) {
PyErr_Format(PyExc_TypeError, "block params must be a dictionary");
return NULL;
}
dom = (virDomainPtr) PyvirDomain_Get(pyobj_dom);
--
2.17.2
5 years, 8 months
[libvirt] [jenkins-ci PATCH] lcitool: Fix name for ppc64le architecture
by Andrea Bolognani
We're only exposing libvirt architecture names externally,
which means the correct value for little-endian 64-bit PowerPC
is ppc64le (VIR_ARCH_PPC64LE).
Note that, while "ppc64el" is not an architecture name
libvirt would recognize, mips64el (VIR_ARCH_MIPS64EL) and
mipsel (VIR_ARCH_MIPSEL) are indeed correct.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
guests/lcitool | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/guests/lcitool b/guests/lcitool
index 1d17c04..d6c8105 100755
--- a/guests/lcitool
+++ b/guests/lcitool
@@ -100,7 +100,7 @@ class Util:
"mips": "mips-linux-gnu",
"mipsel": "mipsel-linux-gnu",
"mips64el": "mips64el-linux-gnuabi64",
- "ppc64el": "powerpc64le-linux-gnu",
+ "ppc64le": "powerpc64le-linux-gnu",
"s390x": "s390x-linux-gnu",
"x86_64": "x86_64-linux-gnu",
}
@@ -118,7 +118,7 @@ class Util:
"mips": "mips",
"mipsel": "mipsel",
"mips64el": "mips64el",
- "ppc64el": "ppc64el",
+ "ppc64le": "ppc64el",
"s390x": "s390x",
"x86_64": "amd64",
}
--
2.20.1
5 years, 8 months
[libvirt] [PATCH 0/2] rbd: improvements to actual disk-usage calculation
by jdillama@redhat.com
From: Jason Dillaman <dillaman(a)redhat.com>
The RBD fast-diff feature can vastly reduce the amount of time needed
to calculate actual disk usage of volumes, but it might still be a
slow operation for large RBD pools or pools with large RBD images.
Therefore, this feature should be able to be optionally disabled if
needed.
Additionally, the fast-diff feature can only be used if the fast-diff
map isn't flagged as invalid. Otherwise, librbd will silently perform
a costly block-by-block scan to calculate the disk usage.
Jason Dillaman (2):
rbd: do not attempt to use fast-diff if it's marked invalid
rbd: optionally disable actual disk-usage during pool/volume refresh
docs/formatstorage.html.in | 13 ++++-
src/storage/storage_backend_rbd.c | 80 ++++++++++++++++++++++++++++---
2 files changed, 84 insertions(+), 9 deletions(-)
--
2.20.1
5 years, 8 months
[libvirt] [dockerfiles PATCH 0/4] Add cross-compilation Dockerfiles
by Andrea Bolognani
lcitool supports generating Dockerfiles targeting cross-compilation
of libvirt, so all that's left to do is teach the refresh script
how to pass the necessary information to lcitool.
Andrea Bolognani (4):
refresh: Drop shell implementation
refresh: Add Python implementation
refresh: Add support for cross-compilation Dockerfiles
Add cross-compilation Dockerfiles
buildenv-debian-9-cross-aarch64.Dockerfile | 95 +++++++++++
buildenv-debian-9-cross-armv6l.Dockerfile | 93 +++++++++++
buildenv-debian-9-cross-armv7l.Dockerfile | 94 +++++++++++
buildenv-debian-9-cross-mips.Dockerfile | 94 +++++++++++
buildenv-debian-9-cross-mips64el.Dockerfile | 94 +++++++++++
buildenv-debian-9-cross-mipsel.Dockerfile | 94 +++++++++++
buildenv-debian-9-cross-ppc64el.Dockerfile | 94 +++++++++++
buildenv-debian-9-cross-s390x.Dockerfile | 94 +++++++++++
buildenv-debian-sid-cross-aarch64.Dockerfile | 94 +++++++++++
buildenv-debian-sid-cross-armv6l.Dockerfile | 92 ++++++++++
buildenv-debian-sid-cross-armv7l.Dockerfile | 93 +++++++++++
buildenv-debian-sid-cross-mips.Dockerfile | 93 +++++++++++
buildenv-debian-sid-cross-mips64el.Dockerfile | 93 +++++++++++
buildenv-debian-sid-cross-mipsel.Dockerfile | 93 +++++++++++
buildenv-debian-sid-cross-ppc64el.Dockerfile | 93 +++++++++++
buildenv-debian-sid-cross-s390x.Dockerfile | 93 +++++++++++
refresh | 158 +++++++++++++++---
17 files changed, 1631 insertions(+), 23 deletions(-)
create mode 100644 buildenv-debian-9-cross-aarch64.Dockerfile
create mode 100644 buildenv-debian-9-cross-armv6l.Dockerfile
create mode 100644 buildenv-debian-9-cross-armv7l.Dockerfile
create mode 100644 buildenv-debian-9-cross-mips.Dockerfile
create mode 100644 buildenv-debian-9-cross-mips64el.Dockerfile
create mode 100644 buildenv-debian-9-cross-mipsel.Dockerfile
create mode 100644 buildenv-debian-9-cross-ppc64el.Dockerfile
create mode 100644 buildenv-debian-9-cross-s390x.Dockerfile
create mode 100644 buildenv-debian-sid-cross-aarch64.Dockerfile
create mode 100644 buildenv-debian-sid-cross-armv6l.Dockerfile
create mode 100644 buildenv-debian-sid-cross-armv7l.Dockerfile
create mode 100644 buildenv-debian-sid-cross-mips.Dockerfile
create mode 100644 buildenv-debian-sid-cross-mips64el.Dockerfile
create mode 100644 buildenv-debian-sid-cross-mipsel.Dockerfile
create mode 100644 buildenv-debian-sid-cross-ppc64el.Dockerfile
create mode 100644 buildenv-debian-sid-cross-s390x.Dockerfile
--
2.20.1
5 years, 8 months
[libvirt] [PATCH 0/1] Fix valgrind.supp path in Makefile.am
by Shotaro Gotanda
Hello,
I'm Shotaro Gotanda from the University of Tokyo.
I'm currently working toward GSOC'19, and creating several pathes for
a bite-sized task.
In that process, I encountered a problem in valgrind test.
In detail, "make -C tests valgrind" failed with several cases even in
master branch(commit 7a05c739c26decb8ff0eef4f6c75ce3ef729532d).
I found a lot of error message like following in test-suite.log
==25680== FATAL: can't open suppressions file "./.valgrind.supp"
This problem occurs in several environment;
Lubuntu18.10(native), Ubuntu18.04(VM), Ubuntu16.04(VM).
Though I have little idea about why this problem occured,
the test succeeded with this patch.
P.S.
Because this is my first contribution to libvirt,
I'm not familiar with reporting bugs, sending patches, and so on.
So, I'll be so glad if you give me any feedback :)
Shotaro Gotanda (1):
tests: fix valgrind.supp path in Makefile
tests/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.19.1
5 years, 8 months
[libvirt] [PULL 0/7] Ui 20190307 patches
by Gerd Hoffmann
The following changes since commit 32694e98b8d7a246345448a8f707d2e11d6c65e2:
Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2019-03-06 18:52:19 +0000)
are available in the Git repository at:
git://git.kraxel.org/qemu tags/ui-20190307-pull-request
for you to fetch changes up to 9b3c34835094760732c65a829bf0c07512126496:
monitor: deprecate acl_show, acl_reset, acl_policy, acl_add, acl_remove (2019-03-07 14:23:22 +0100)
----------------------------------------------------------------
curses: better wide char support.
vnc: acl update, stall fix.
----------------------------------------------------------------
Daniel P. Berrangé (2):
vnc: allow specifying a custom authorization object name
monitor: deprecate acl_show, acl_reset, acl_policy, acl_add,
acl_remove
Gerd Hoffmann (1):
vnc: fix update stalls
Samuel Thibault (4):
Reduce curses escdelay from 1s to 25ms
curses: support wide input
iconv: detect and make curses depend on it
curses: add option to specify VGA font encoding
configure | 45 ++++-
ui/curses_keys.h | 113 +++++++------
monitor.c | 23 +++
ui/curses.c | 394 ++++++++++++++++++++++++++++++++++++-------
ui/vnc.c | 64 ++++++-
vl.c | 2 +-
qapi/ui.json | 14 ++
qemu-deprecated.texi | 11 ++
qemu-options.hx | 40 +++--
9 files changed, 574 insertions(+), 132 deletions(-)
--
2.18.1
5 years, 8 months
[libvirt] [PULL 0/5] Ui 20190311 v2 patches
by Gerd Hoffmann
The following changes since commit e2a18635a400b0e68679614132e9ef6316105590:
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-03-08' into staging (2019-03-09 20:55:44 +0000)
are available in the Git repository at:
git://git.kraxel.org/qemu tags/ui-20190311-v2-pull-request
for you to fetch changes up to 0143840771548e8ffece831398d745880ddfa080:
monitor: deprecate acl_show, acl_reset, acl_policy, acl_add, acl_remove (2019-03-11 08:39:02 +0100)
----------------------------------------------------------------
curses: wide char input support.
vnc: acl update, stall fix.
----------------------------------------------------------------
Daniel P. Berrangé (2):
vnc: allow specifying a custom authorization object name
monitor: deprecate acl_show, acl_reset, acl_policy, acl_add,
acl_remove
Gerd Hoffmann (1):
vnc: fix update stalls
Samuel Thibault (2):
Reduce curses escdelay from 1s to 25ms
curses: support wide input
ui/curses_keys.h | 113 +++++++++++++++++++++++++------------------
monitor.c | 23 +++++++++
ui/curses.c | 79 ++++++++++++++++++++++++------
ui/vnc.c | 64 ++++++++++++++++++++----
qemu-deprecated.texi | 11 +++++
qemu-options.hx | 35 ++++++++++----
6 files changed, 243 insertions(+), 82 deletions(-)
--
2.18.1
5 years, 8 months
[libvirt] [PATCH python] Fix handling of optional params in blockCopy()
by Nir Soffer
Commit 2b4bd07e0a22 (Add check for params, nparams being a dictionary)
changed the way the optional params argument is treated. If
libvirt.virDomain.blockCopy() is called without specifying params,
params is None, and the call will fail with:
TypeError: block params must be a dictionary
This is wrong as params is defined as kwarg, breaking existing libvirt
users like oVirt. Remove the check, restoring the previous behaviour.
Resolves: https://bugzilla.redhat.com/1687114
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
libvirt-override.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libvirt-override.c b/libvirt-override.c
index 857c018..127d71c 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -8829,19 +8829,17 @@ libvirt_virDomainBlockCopy(PyObject *self ATTRIBUTE_UNUSED,
if (!PyArg_ParseTuple(args, (char *) "Ozz|OI:virDomainBlockCopy",
&pyobj_dom, &disk, &destxml, &pyobj_dict, &flags))
return NULL;
+ /* Note: params is optional in libvirt.py */
if (PyDict_Check(pyobj_dict)) {
if (virPyDictToTypedParams(pyobj_dict, ¶ms, &nparams,
virPyDomainBlockCopyParams,
VIR_N_ELEMENTS(virPyDomainBlockCopyParams)) < 0) {
return NULL;
}
- } else {
- PyErr_Format(PyExc_TypeError, "block params must be a dictionary");
- return NULL;
}
dom = (virDomainPtr) PyvirDomain_Get(pyobj_dom);
LIBVIRT_BEGIN_ALLOW_THREADS;
--
2.17.2
5 years, 8 months