[libvirt] [dbus PATCH 0/2] Add missing properties from LIBVIRT 0.0.3
by Katerina Koukiou
Implemented the following properties:
* virConnectGetVersion
* virConnectNumOfDomains
Katerina Koukiou (2):
Add 'Version' property for virConnectGetVersion
Add 'NumOfDomains' property for virConnectGetNumOfDomains
data/org.libvirt.Connect.xml | 8 ++++++++
src/connect.c | 45 +++++++++++++++++++++++++++++++++++++++++++-
test/test_connect.py | 9 +++++++++
3 files changed, 61 insertions(+), 1 deletion(-)
--
2.15.0
6 years, 8 months
[libvirt] [PATCHv2 0/6] Use query-cpus-fast instead of query-cpus
by Viktor Mihajlovski
The QEMU monitor commmand query-cpus is deprecated starting
with QEMU 2.12.0 because it can adversely affect the performance of
a running virtual machine.
This series enables libvirt to use the new query-cpus-fast interface
if supported by the local QEMU instance and is required in order
to support QEMU once the interface has been removed.
query-cpus-fast doesn't return the halted state for a virtual CPU,
meaning that the vcpu.<n>.halted value won't be reported with
'virsh domstats' anymore. This is OK, as stats values are not
guaranteed to be reported under all circumstances and on all
architectures.
Upstream discussion consensus was that the halted state was
problematic anyway, as it had different semantics per architecture.
The only known exploitation happened for s390, for this architecture
the halted state will be computed based on an architecture-specific
cpu value returned in query-cpus-fast.
v1 -> v2:
=========
Patch changes:
1/6:
- add Acked-by: Peter Krempa
2/6:
- evaluate capability outside of monitor code (changes signatures
of qemuMonitorGetCPUInfo and qemuMonitorGetCpuHalted)
- remove ternary expressions as requested by review
- remove Reviewed-bys due to code changes
3/6
- adapt test cases to changes above
- remove Reviewed-bys due to code changes
4/6
- replace callbacks for architecture data extraction with direct
function calls
- remove Reviewed-bys due to code changes
Viktor Mihajlovski (6):
qemu: add capability detection for query-cpus-fast
qemu: use query-cpus-fast in JSON monitor
tests: add qemumonitorjson tests for query-cpus-fast
qemu: add architecture-specific CPU info handling
tests: add testcase for s390 query-cpus-fast
qemu: refresh vcpu halted state only via query-cpus-fast
src/qemu/qemu_capabilities.c | 4 +-
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_domain.c | 21 +++-
src/qemu/qemu_monitor.c | 30 +++--
src/qemu/qemu_monitor.h | 7 +-
src/qemu/qemu_monitor_json.c | 116 +++++++++++++++++--
src/qemu/qemu_monitor_json.h | 3 +-
.../qemumonitorjson-cpuinfo-ppc64-hotplug-4.data | 8 ++
.../qemumonitorjson-cpuinfo-s390-fast-cpus.json | 21 ++++
.../qemumonitorjson-cpuinfo-s390-fast-hotplug.json | 21 ++++
.../qemumonitorjson-cpuinfo-s390-fast.data | 19 ++++
...emumonitorjson-cpuinfo-x86-basic-pluggable.data | 5 +
...qemumonitorjson-cpuinfo-x86-full-fast-cpus.json | 71 ++++++++++++
...umonitorjson-cpuinfo-x86-full-fast-hotplug.json | 115 +++++++++++++++++++
.../qemumonitorjson-cpuinfo-x86-full-fast.data | 109 ++++++++++++++++++
.../qemumonitorjson-cpuinfo-x86-node-full.data | 2 +
tests/qemumonitorjsontest.c | 123 ++++++++++++++++-----
tests/qemumonitortestutils.c | 6 +
tests/qemumonitortestutils.h | 1 +
19 files changed, 625 insertions(+), 58 deletions(-)
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-s390-fast-cpus.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-s390-fast-hotplug.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-s390-fast.data
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-cpus.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-hotplug.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast.data
--
1.9.1
6 years, 8 months
[libvirt] [PATCH sandbox] Fix argparser incompatibilities with newer python 3
by Daniel P. Berrangé
Python 3 changes such that if no subparser command is listed, it just
throws an error. To get back the old behavior we need to set the
'required' attribute and a dest name.
Since we treat 'debug' as a global attribute we need to set that on the
top level parser too, otherwise we get a missing attribute error with
newish python 3 too.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
libvirt-sandbox/image/cli.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libvirt-sandbox/image/cli.py b/libvirt-sandbox/image/cli.py
index 490c5e0..d2035de 100644
--- a/libvirt-sandbox/image/cli.py
+++ b/libvirt-sandbox/image/cli.py
@@ -202,7 +202,6 @@ Example supported URI formats:
def gen_purge_args(subparser):
parser = gen_command_parser(subparser, "purge",
_("Purge cached template"))
- requires_debug(parser)
requires_template(parser)
requires_template_dir(parser)
parser.set_defaults(func=purge)
@@ -210,7 +209,6 @@ def gen_purge_args(subparser):
def gen_prepare_args(subparser):
parser = gen_command_parser(subparser, "prepare",
_("Prepare local template"))
- requires_debug(parser)
requires_template(parser)
requires_connect(parser)
requires_template_dir(parser)
@@ -219,7 +217,6 @@ def gen_prepare_args(subparser):
def gen_run_args(subparser):
parser = gen_command_parser(subparser, "run",
_("Run an instance of a template"))
- requires_debug(parser)
requires_name(parser)
requires_template(parser)
requires_connect(parser)
@@ -238,7 +235,6 @@ def gen_run_args(subparser):
def gen_list_args(subparser):
parser = gen_command_parser(subparser, "list",
_("List locally cached images"))
- requires_debug(parser)
requires_template_dir(parser)
parser.add_argument("-s","--source",
@@ -249,7 +245,11 @@ def gen_list_args(subparser):
def main():
parser = argparse.ArgumentParser(description="Sandbox Container Image Tool")
+ requires_debug(parser)
+
subparser = parser.add_subparsers(help=_("commands"))
+ subparser.required = True
+ subparser.dest = "command"
gen_purge_args(subparser)
gen_prepare_args(subparser)
gen_run_args(subparser)
--
2.14.3
6 years, 8 months
[libvirt] [PATCH sandbox] rpm: fix references to python 2 packages / files
by Daniel P. Berrangé
Since we switched to python 3, we should have deps on the python 3 based
packages, and look at the python 3 sitelib directory.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
libvirt-sandbox.spec.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libvirt-sandbox.spec.in b/libvirt-sandbox.spec.in
index 17e9dd9..f5868c1 100644
--- a/libvirt-sandbox.spec.in
+++ b/libvirt-sandbox.spec.in
@@ -36,12 +36,12 @@ BuildRequires: zlib-devel >= 1.2.0, zlib-static
BuildRequires: libtirpc-devel
BuildRequires: rpcgen
%endif
-Requires: rpm-python
+Requires: python3-rpm
# For virsh lxc-enter-namespace command
Requires: libvirt-client >= %{libvirt_version}
Requires: systemd >= 198
Requires: pygobject3-base
-Requires: libselinux-python
+Requires: libselinux-python3
Requires: %{name}-libs = %{version}-%{release}
Requires: %{_bindir}/virt-builder
@@ -108,7 +108,7 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/virt-sandbox-service
%{_bindir}/virt-sandbox-image
%{_libexecdir}/virt-sandbox-service-util
-%{python_sitelib}/libvirt_sandbox
+%{python3_sitelib}/libvirt_sandbox
%{_mandir}/man1/virt-sandbox.1*
%{_mandir}/man1/virt-sandbox-service.1*
%{_mandir}/man1/virt-sandbox-service-*.1*
--
2.14.3
6 years, 8 months
[libvirt] [PATCH sandbox] Explicitly check for python3 in configure.ac
by Daniel P. Berrangé
A bare AM_PATH_PYTHON statement is satisfied by any version of python >=
2.0.0, but we converted to Python 3, so should be explicit about it.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index cb7a483..28305d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -130,7 +130,7 @@ dnl Should be in m4/virt-gettext.m4 but intltoolize is too
dnl dumb to find it there
IT_PROG_INTLTOOL([0.35.0])
-AM_PATH_PYTHON
+AM_PATH_PYTHON([3])
AC_OUTPUT(Makefile
libvirt-sandbox/Makefile
--
2.14.3
6 years, 8 months
[libvirt] [PATCH 0/5] Improve handling of multipath devices
by Michal Privoznik
Imagine you have a device mapper target which consists of 1..N disks
(e.g. it's a multipath device, LUKS disk, whatever). Now, libvirt
currently allows only the frontend (/dev/dm-1) in CGroups. However, this
can make qemu fail [1] so we need to allow all the backend devices too.
1: https://bugzilla.redhat.com/show_bug.cgi?id=1557769#c22
Michal Privoznik (5):
virlog: Don't log devmapper
utils: Introduce virFileGetMPathTargets
virfile: Introduce virFileMajMinToName
qemu: Handle multipath devices properly
news: Document multipath fix
docs/news.xml | 10 ++++
libvirt.spec.in | 2 +
src/libvirt_private.syms | 2 +
src/qemu/qemu_cgroup.c | 43 +++++++++++++-
src/qemu/qemu_domain.c | 58 +++++++++++++++++++
src/util/virfile.c | 143 +++++++++++++++++++++++++++++++++++++++++++++++
src/util/virfile.h | 7 +++
src/util/virlog.c | 23 ++++++++
8 files changed, 285 insertions(+), 3 deletions(-)
--
2.16.1
6 years, 8 months
[libvirt] [PATCH sandbox] Python 3 renamed string.lowercase to string.ascii_lowercase
by Daniel P. Berrangé
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
libvirt-sandbox/image/cli.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt-sandbox/image/cli.py b/libvirt-sandbox/image/cli.py
index d2035de..605183c 100644
--- a/libvirt-sandbox/image/cli.py
+++ b/libvirt-sandbox/image/cli.py
@@ -81,7 +81,7 @@ def prepare(args):
connect=args.connect)
def random_domain_name(tmpl):
- randomid = ''.join(random.choice(string.lowercase) for i in range(10))
+ randomid = ''.join(random.choice(string.ascii_lowercase) for i in range(10))
return re.sub('[^a-z0-9-]', '_', tmpl.path[1:], re.I) + ":" + randomid
def run(args):
--
2.14.3
6 years, 8 months
[libvirt] [dbus PATCH v2 0/6] Use API calls supporting flags
by Katerina Koukiou
* Use API calls with flags parameter when possible
* Since libvirt-dbus API doesn't follow strictly the naming
of libvirt API there should be documentation regarding which
libvirt API is used for each libvirt-dbus API.
This patch introduces documentation annotations in D-Bus Interface XML
files which will be used later to generate proper documentation.
Katerina Koukiou (6):
virtDBusDomainGetVcpus: Should be implemented as method and not as
property
virtDBusDomainShutdown: Use virDomainShutdownFlags instead of
virDomainShutdown
virtDBusDomainCreate: Use virDomainCreateWithFlags instead of
virDomainCreate
virtDBusDomainUndefine: Use virDomainUndefineFlags instead of
virDomainUndefine
virtDBusDomainDestroy: Use virDomainDestroyFlags instead of
virDomainDestroy
Use Documentation Annotations in D-Bus Interface XML
data/org.libvirt.Connect.xml | 24 ++++++++++++
data/org.libvirt.Domain.xml | 87 +++++++++++++++++++++++++++++++++++++-------
src/domain.c | 71 +++++++++++++++++++++++-------------
test/test_domain.py | 22 +++++++----
4 files changed, 157 insertions(+), 47 deletions(-)
--
2.15.0
6 years, 8 months
[libvirt] [tck PATCH] require libguestfs-tool package
by Laine Stump
The nwfilter tests use virt-builder to download and configure a guest
appliance, but we don't require the libguestfs-tools package. Up until
now it's just happened that it was always already installed on the
test systems, so it wasn't a problem, but it's annoying to have to
type the one extra install command when setting up a new machine to
run the tests.
Signed-off-by: Laine Stump <laine(a)laine.org>
---
perl-Sys-Virt-TCK.spec.PL | 1 +
1 file changed, 1 insertion(+)
diff --git a/perl-Sys-Virt-TCK.spec.PL b/perl-Sys-Virt-TCK.spec.PL
index 7c83be9..9694227 100644
--- a/perl-Sys-Virt-TCK.spec.PL
+++ b/perl-Sys-Virt-TCK.spec.PL
@@ -75,6 +75,7 @@ Requires: perl(TAP::Formatter::JUnit)
Requires: perl(TAP::Harness::Archive)
Requires: perl(Net::OpenSSH)
Requires: perl(IO::Pty)
+Requires: libguestfs-tools
Requires: /usr/bin/mkisofs
BuildArchitectures: noarch
--
2.14.3
6 years, 8 months