[libvirt] [PATCH v2 0/2] processor frequency information on S390
by Bjoern Walk
Since kernel version 4.7, processor frequency information is available
on S390. This patch series extends the parser for system information.
Let's also add a testcase to the test suite for a S390 CPU configuration
running kernel version 4.14 on LPAR.
This is basically patch 3 of this series:
https://www.redhat.com/archives/libvir-list/2017-December/msg00633.html
v1 -> v2:
- add debug logging
- don't discard the whole hostsysinfo when the parsing fails
- don't try to parse a value for external_clock, that information is
not available on S390
- add test case for to sysinfotest.c
Bjoern Walk (2):
util: virsysinfo: parse frequency information on S390
tests: sysinfotest: add new test case for S390
src/util/virsysinfo.c | 41 ++++++-
tests/sysinfodata/s390-freqcpuinfo.data | 52 +++++++++
tests/sysinfodata/s390-freqsysinfo.data | 173 ++++++++++++++++++++++++++++++
tests/sysinfodata/s390-freqsysinfo.expect | 63 +++++++++++
tests/sysinfotest.c | 1 +
5 files changed, 325 insertions(+), 5 deletions(-)
create mode 100644 tests/sysinfodata/s390-freqcpuinfo.data
create mode 100644 tests/sysinfodata/s390-freqsysinfo.data
create mode 100644 tests/sysinfodata/s390-freqsysinfo.expect
--
2.13.4
6 years, 11 months
[libvirt] [jenkins-ci PATCH] guests: Make rpcgen mapping more future-proof
by Andrea Bolognani
Since whatever is in Fedora Rawhide will end up in future Fedora
releases, it makes sense to use the newer package as default and
override it for existing releases (as well as CentOS), so that
no tweaking will be needed when Fedora 28 and later are added to
the CI setup.
Suggested-by: Peter Krempa <pkrempa(a)redhat.com>
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
guests/vars/mappings.yml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
index b79757e..0b32f90 100644
--- a/guests/vars/mappings.yml
+++ b/guests/vars/mappings.yml
@@ -606,8 +606,10 @@ mappings:
rpcgen:
deb: libc-dev-bin
- rpm: glibc-common
- FedoraRawhide: glibc-rpcgen
+ rpm: glibc-rpcgen
+ CentOS: glibc-common
+ Fedora26: glibc-common
+ Fedora27: glibc-common
FreeBSD:
rpmbuild:
--
2.14.3
6 years, 11 months
[libvirt] [PATCH 0/2] travis: Fix build failure
by Andrea Bolognani
It would be nice to have all greens before the release :)
Andrea Bolognani (2):
travis: Sync packages with libvirt-jenkins-ci
travis: Skip nfs-common installation
.travis.yml | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
--
2.14.3
6 years, 11 months
[libvirt] [PATCH V4] blockjob: Fix error checking of blockjob status
by Jie Wang
offset and len can also be equal to 0 on failed if blockjob return
status:"BLOCK_JOB_COMPLETED" with error:"File descriptor in bad state",
so we need to check 'error' in this case.
---
src/qemu/qemu_monitor_json.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index e45868b..39c0909 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -886,7 +886,7 @@ qemuMonitorJSONHandleBlockJobImpl(qemuMonitorPtr mon,
case VIR_DOMAIN_BLOCK_JOB_COMPLETED:
error = virJSONValueObjectGetString(data, "error");
/* Make sure the whole device has been processed */
- if (offset != len)
+ if (offset != len || error)
event = VIR_DOMAIN_BLOCK_JOB_FAILED;
break;
case VIR_DOMAIN_BLOCK_JOB_CANCELED:
--
1.8.3.1
6 years, 11 months
[libvirt] [jenkins-ci PATCH] guests: Install rpcgen when building libvirt
by Andrea Bolognani
The dependency on rpcgen had not been made explicit up until now
because the command was part of the base glibc development packages;
however, Fedora Rawhide now ships it in a separate package, so we
need to list it along with all other dependencies in order for it
to get installed.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
guests/vars/mappings.yml | 6 ++++++
guests/vars/projects/libvirt.yml | 1 +
2 files changed, 7 insertions(+)
diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
index eca8dbe..b79757e 100644
--- a/guests/vars/mappings.yml
+++ b/guests/vars/mappings.yml
@@ -604,6 +604,12 @@ mappings:
pkg: readline
rpm: readline-devel
+ rpcgen:
+ deb: libc-dev-bin
+ rpm: glibc-common
+ FedoraRawhide: glibc-rpcgen
+ FreeBSD:
+
rpmbuild:
rpm: rpm-build
diff --git a/guests/vars/projects/libvirt.yml b/guests/vars/projects/libvirt.yml
index 407881d..ba1e4c3 100644
--- a/guests/vars/projects/libvirt.yml
+++ b/guests/vars/projects/libvirt.yml
@@ -67,6 +67,7 @@ packages:
- qemu-img
- radvd
- readline
+ - rpcgen
- sanlock
- scrub
- sheepdog
--
2.14.3
6 years, 11 months
[libvirt] [PATCH] libvirtd: clarify the TLS conf default vaule setting
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)gmail.com>
As the description of daemon/libvirtd.conf, setting
key_file, cert_file or key_file will override the default value.
But if we set any one of them, we need to set all the rest of them.
This patch clarify that description.
Signed-off-by: Chen Hanxiao <chenhanxiao(a)gmail.com>
---
daemon/libvirtd.conf | 3 +++
1 file changed, 3 insertions(+)
diff --git a/daemon/libvirtd.conf b/daemon/libvirtd.conf
index 8e0c0d96d..7040ff26b 100644
--- a/daemon/libvirtd.conf
+++ b/daemon/libvirtd.conf
@@ -183,6 +183,9 @@
#
+# NB, if the default value of 'key_file', 'cert_file" or
+# 'ca_file' would be changed,
+# all of them should be changed together.
# Override the default server key file path
#
#key_file = "/etc/pki/libvirt/private/serverkey.pem"
--
2.14.3
6 years, 11 months
[libvirt] [PATCH] m4: Don't enable bash-completion by default
by Michal Privoznik
Due to the way that check logic was written we basically enabled
bash completion whenever readline was enabled. This is not right
because it made bash-completion pkg-config module required.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Even though this would qualify as a build breaker, I'd rather have
another pair of eyes to look at it (sorry Cyclops).
m4/virt-bash-completion.m4 | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/m4/virt-bash-completion.m4 b/m4/virt-bash-completion.m4
index e1ef58740..c8342176f 100644
--- a/m4/virt-bash-completion.m4
+++ b/m4/virt-bash-completion.m4
@@ -30,14 +30,10 @@ AC_DEFUN([LIBVIRT_CHECK_BASH_COMPLETION], [
AC_REQUIRE([LIBVIRT_CHECK_READLINE])
if test "x$with_readline" != "xyes" ; then
- if test "x$with_bash_completion" != "xyes" ; then
- with_bash_completion=no
- else
+ if test "x$with_bash_completion" = "xyes" ; then
AC_MSG_ERROR([readline is required for bash completion support])
- fi
- else
- if test "x$with_bash_completion" = "xcheck" ; then
- with_bash_completion=yes
+ else
+ with_bash_completion=no
fi
fi
--
2.13.6
6 years, 11 months
[libvirt] [PATCH] qemu: Fix type of a completed job
by Jiri Denemark
Libvirt 3.7.0 and earlier libvirt reported a migration job as completed
immediately after QEMU finished sending migration data at which point
migration was not really complete yet. Commit v3.7.0-29-g3f2d6d829e
fixed this, but caused a regression in reporting statistics for
completed jobs which started reporting the job as still running. This
happened because the completed job statistics including the job status
are copied from the running job before we finally mark it as completed.
Let's make sure QEMU_DOMAIN_JOB_STATUS_COMPLETED is always set in the
completed job info even when the job has not finished yet.
https://bugzilla.redhat.com/show_bug.cgi?id=1523036
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_migration.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index c1ceb164d1..a56bc596ff 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1646,8 +1646,10 @@ qemuMigrationWaitForCompletion(virQEMUDriverPtr driver,
qemuDomainJobInfoUpdateTime(jobInfo);
qemuDomainJobInfoUpdateDowntime(jobInfo);
VIR_FREE(priv->job.completed);
- if (VIR_ALLOC(priv->job.completed) == 0)
+ if (VIR_ALLOC(priv->job.completed) == 0) {
*priv->job.completed = *jobInfo;
+ priv->job.completed->status = QEMU_DOMAIN_JOB_STATUS_COMPLETED;
+ }
if (asyncJob != QEMU_ASYNC_JOB_MIGRATION_OUT &&
jobInfo->status == QEMU_DOMAIN_JOB_STATUS_QEMU_COMPLETED)
@@ -5479,8 +5481,9 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
}
if (dom) {
- priv->job.completed = jobInfo;
- jobInfo = NULL;
+ VIR_STEAL_PTR(priv->job.completed, jobInfo);
+ priv->job.completed->status = QEMU_DOMAIN_JOB_STATUS_COMPLETED;
+
if (qemuMigrationBakeCookie(mig, driver, vm, cookieout, cookieoutlen,
QEMU_MIGRATION_COOKIE_STATS) < 0)
VIR_WARN("Unable to encode migration cookie");
--
2.15.1
6 years, 11 months
[libvirt] [PATCH] qemu: Ignore fallback CPU attribute on reconnect
by Jiri Denemark
When reconnecting to a running domain with host-model CPU started by old
libvirt which did not store the actual CPU in the status XML, we need to
ignore the fallback attribute to make sure we can translate the detected
host CPU model to a model which is supported by the running QEMU.
https://bugzilla.redhat.com/show_bug.cgi?id=1532980
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_process.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 1a0923af36..25ec464d3e 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3887,6 +3887,11 @@ qemuProcessUpdateCPU(virQEMUDriverPtr driver,
virDomainCapsCPUModelsPtr models = NULL;
int ret = -1;
+ /* The host CPU model comes from host caps rather than QEMU caps so
+ * fallback must be allowed no matter what the user specified in the XML.
+ */
+ vm->def->cpu->fallback = VIR_CPU_FALLBACK_ALLOW;
+
if (qemuProcessFetchGuestCPU(driver, vm, asyncJob, &cpu, &disabled) < 0)
goto cleanup;
--
2.15.1
6 years, 11 months