[libvirt] [PATCH 0/3] virSysinfo: Try dmidecode on aarch64
by Michal Privoznik
Turns out some aarch64 machines provide SMBIOS and thus we can use
dmidecode to get the sysinfo. Currently, we're parsing /proc/cpuinfo
which is very sparse on ARMs.
Yes, ideally everything would be exposed somewhere in sysfs, and libvirt
would ditch dmidecode in favor of sysfs, but how realistic is that?
Michal Prívozník (3):
virSysinfoRead: Simplify #ifdef underbush
virSysinfoParseX86BaseBoard: Free memory upfront if no board detected
virSysinfoReadARM: Try reading DMI table
src/util/virsysinfo.c | 43 +++++++++++++++++++++++++++++++------------
1 file changed, 31 insertions(+), 12 deletions(-)
--
2.21.0
5 years, 7 months
[libvirt] [PATCH] test_driver: implement virDomainGetDiskErrors
by Ilias Stamatis
Return the number of disks present in the configuration of the fake
driver when called with @errors as NULL and @maxerrors as 0.
Otherwise return 0 as the number of errors encountered.
Signed-off-by: Ilias Stamatis <stamatis.iliass(a)gmail.com>
---
src/test/test_driver.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 460c896ef6..5fa9ab30f1 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -3046,6 +3046,32 @@ static int testDomainSetAutostart(virDomainPtr domain,
return 0;
}
+static int testDomainGetDiskErrors(virDomainPtr dom,
+ virDomainDiskErrorPtr errors,
+ unsigned int maxerrors ATTRIBUTE_UNUSED,
+ unsigned int flags)
+{
+ int ret = -1;
+ virDomainObjPtr vm = NULL;
+
+ virCheckFlags(0, -1);
+
+ if (!(vm = testDomObjFromDomain(dom)))
+ goto cleanup;
+
+ if (virDomainObjCheckActive(vm) < 0)
+ goto cleanup;
+
+ if (!errors)
+ ret = vm->def->ndisks;
+ else
+ ret = 0;
+
+ cleanup:
+ virDomainObjEndAPI(&vm);
+ return ret;
+}
+
static char *testDomainGetSchedulerType(virDomainPtr domain ATTRIBUTE_UNUSED,
int *nparams)
{
@@ -6833,6 +6859,7 @@ static virHypervisorDriver testHypervisorDriver = {
.domainUndefineFlags = testDomainUndefineFlags, /* 0.9.4 */
.domainGetAutostart = testDomainGetAutostart, /* 0.3.2 */
.domainSetAutostart = testDomainSetAutostart, /* 0.3.2 */
+ .domainGetDiskErrors = testDomainGetDiskErrors, /* 5.4.0 */
.domainGetSchedulerType = testDomainGetSchedulerType, /* 0.3.2 */
.domainGetSchedulerParameters = testDomainGetSchedulerParameters, /* 0.3.2 */
.domainGetSchedulerParametersFlags = testDomainGetSchedulerParametersFlags, /* 0.9.2 */
--
2.21.0
5 years, 7 months
[libvirt] [PATCH] build: restore support for libyajl 2.0.1
by Ján Tomko
Commit 105756660f944e7db02de3b55b98bb7c11cd03bf was too eager and did
not consider SLE 12 which still has 2.0.1 that does not ship
a pkg-config file.
Similar to how we check for readline, prefer pkg-config if available
and fall back to the old detection code if not found.
NB: this is not a clean revert because we're not reintroducing support
for YAJL 1.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
Reported-by: Olaf Hering <olaf(a)aepfle.de>
---
m4/virt-yajl.m4 | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/m4/virt-yajl.m4 b/m4/virt-yajl.m4
index 494e722963..05a8f8b9bd 100644
--- a/m4/virt-yajl.m4
+++ b/m4/virt-yajl.m4
@@ -24,7 +24,19 @@ AC_DEFUN([LIBVIRT_ARG_YAJL],[
AC_DEFUN([LIBVIRT_CHECK_YAJL],[
dnl YAJL JSON library http://lloyd.github.com/yajl/
- LIBVIRT_CHECK_PKG([YAJL], [yajl], [2.0.3])
+ PKG_CHECK_EXISTS([readline], [use_pkgconfig=1], [use_pkgconfig=0])
+
+ if test $use_pkgconfig = 1; then
+ dnl 2.0.3 was the version where the pkg-config file was first added
+ LIBVIRT_CHECK_PKG([YAJL], [yajl], [2.0.3])
+ else
+ dnl SUSE SLE 12 and OpenSUSE Leap 42.3 still use 2.0.1
+ dnl TODO: delete this in July 2020
+ LIBVIRT_CHECK_LIB_ALT([YAJL], [yajl],
+ [yajl_tree_parse], [yajl/yajl_common.h])
+
+ fi
+
])
AC_DEFUN([LIBVIRT_RESULT_YAJL],[
--
2.19.2
5 years, 7 months
[libvirt] [jenkins-ci PATCH 0/4] guests: Introduce package_manager
by Andrea Bolognani
As mentioned in [1] and detailed in [2], Fedora is planning to drop
the 'yum' command and require users to call 'dnf' exclusively.
In fact, it looks like this change has already been implemented in
Rawhide, so we need to adapt sooner rather than later.
The first two patches address the actual compatibility issue, while
the remaining ones perform some cleanups which are either made much
easier by the previous changes or I just happened to stumble upon
while working on this :)
[1] https://www.redhat.com/archives/libvir-list/2019-May/msg00043.html
[2] https://fedoraproject.org/wiki/Changes/Retire_YUM_3
Andrea Bolognani (4):
guests: Introduce package_manager
guests: Use package_manager everywhere
guests: Don't call out to the shell twice
lcitool: Fix Dockerfile alignment
guests/host_vars/libvirt-centos-7/main.yml | 1 +
guests/host_vars/libvirt-debian-9/main.yml | 1 +
guests/host_vars/libvirt-debian-sid/main.yml | 1 +
guests/host_vars/libvirt-fedora-29/main.yml | 1 +
guests/host_vars/libvirt-fedora-30/main.yml | 1 +
.../host_vars/libvirt-fedora-rawhide/main.yml | 1 +
guests/host_vars/libvirt-freebsd-11/main.yml | 1 +
guests/host_vars/libvirt-freebsd-12/main.yml | 1 +
.../libvirt-freebsd-current/main.yml | 1 +
guests/host_vars/libvirt-ubuntu-18/main.yml | 1 +
guests/lcitool | 48 ++++++++++---------
guests/playbooks/update/tasks/base.yml | 19 ++------
guests/playbooks/update/tasks/bootstrap.yml | 16 +------
13 files changed, 42 insertions(+), 51 deletions(-)
--
2.20.1
5 years, 7 months
[libvirt] [PATCH 00/12] qemu: Refactor image permission/lock setting (blockdev-add saga)
by Peter Krempa
With new blockjob handling we'll need to modify permissions for chains
and individual images. The individual image code was universally
accessible but the chain setting code reimplemented it mostly only in
qemu_hotplug.h.
Refactor the handling by moving the code to qemu_domain.c and making it
universal.
Peter Krempa (12):
qemu: Rename qemuDomainDiskChainElement(Revoke|Prepare)
qemu: Move and rename qemuHotplugPrepareDiskSourceAccess
qemu: Split entry points to qemuDomainStorageSourceChainAccessPrepare
qemu: domain: Rename qemuDomainStorageSourceChainAccessPrepare
qemu: Convert boolean flags to enum flags in
qemuDomainStorageSourceAccessModify
qemu: Allow using qemuDomainStorageSourceAccessModify on singe images
qemu: Refactor/simplify qemuDomainStorageSourceAccessRevoke
qemu: Allow forcing read-only mode in
qemuDomainStorageSourceAccessModify
qemu: Use bools rather than labels in
qemuDomainStorageSourceAccessModify
qemu: Allow skipping the revoke step in
qemuDomainStorageSourceAccessModify
qemu: Mark when modifying access to existing source in
qemuDomainStorageSourceAccessModify
qemu: Refactor/simplify qemuDomainStorageSourceAccessAllow
src/qemu/qemu_domain.c | 212 +++++++++++++++++++++++++++++++---------
src/qemu/qemu_domain.h | 23 +++--
src/qemu/qemu_driver.c | 24 ++---
src/qemu/qemu_hotplug.c | 80 ++-------------
4 files changed, 200 insertions(+), 139 deletions(-)
--
2.20.1
5 years, 7 months
[libvirt] [PATCH 0/4] virObject for snapshot def [incremental backup saga]
by Eric Blake
Peter rightly complained that my attempt to leave a todo in
virdomainmomentobjlist.c about not being polymorphic enough gives no
incentive to get it fixed later once incremental backups are in, so
instead fix it now. My v9 backup patches will be changed similarly to
the changes to snapshot shown here.
Eric Blake (4):
snapshot: s/parent/parent_name/ as prep for virObject
snapshot: s/current/parent/ as prep for virObject
snapshot: Add virDomainSnapshotDefNew
snapshot: Make virDomainSnapshotDef a virObject
src/conf/moment_conf.h | 7 +-
src/conf/snapshot_conf.h | 4 +-
cfg.mk | 2 -
src/conf/moment_conf.c | 30 ++++-
src/conf/snapshot_conf.c | 164 ++++++++++++++++------------
src/conf/virdomainmomentobjlist.c | 7 +-
src/conf/virdomainsnapshotobjlist.c | 2 +-
src/esx/esx_driver.c | 19 ++--
src/libvirt_private.syms | 2 +-
src/qemu/qemu_domain.c | 10 +-
src/qemu/qemu_driver.c | 29 +++--
src/test/test_driver.c | 25 ++---
src/vbox/vbox_common.c | 95 ++++++++--------
src/vz/vz_driver.c | 5 +-
src/vz/vz_sdk.c | 10 +-
tests/domainsnapshotxml2xmltest.c | 3 +-
16 files changed, 230 insertions(+), 184 deletions(-)
--
2.20.1
5 years, 7 months
[libvirt] [PATCH] spec: Bump minimum supported Fedora version to 29
by Andrea Bolognani
Fedora 30 is out, which means that Fedora 28 is going to be
EOL very soon. Let's get ahead of the game and drop support
for it right now.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
libvirt.spec.in | 2 +-
mingw-libvirt.spec.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 876b2f0897..e07041c0b9 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -4,7 +4,7 @@
# that's still supported by the vendor. It may work on other distros
# or versions, but no effort will be made to ensure that going forward.
%define min_rhel 7
-%define min_fedora 28
+%define min_fedora 29
%if (0%{?fedora} && 0%{?fedora} >= %{min_fedora}) || (0%{?rhel} && 0%{?rhel} >= %{min_rhel})
%define supported_platform 1
diff --git a/mingw-libvirt.spec.in b/mingw-libvirt.spec.in
index 8a96ea914c..9add033669 100644
--- a/mingw-libvirt.spec.in
+++ b/mingw-libvirt.spec.in
@@ -3,7 +3,7 @@
# This spec file assumes you are building on a Fedora version
# that's still supported by the vendor. It may work on other distros
# or versions, but no effort will be made to ensure that going forward.
-%define min_fedora 28
+%define min_fedora 29
%if 0%{?fedora} && 0%{?fedora} >= %{min_fedora}
%define supported_platform 1
--
2.20.1
5 years, 7 months
[libvirt] [jenkins-ci PATCH 0/4] Add Fedora 30, drop Fedora 28
by Andrea Bolognani
I guess it's been six months already.
Andrea Bolognani (4):
guests: Add Fedora 30
Start building on Fedora 30
Stop building on Fedora 28
guests: Drop Fedora 28
guests/host_vars/libvirt-fedora-28/docker.yml | 2 -
guests/host_vars/libvirt-fedora-30/docker.yml | 2 +
.../install.yml | 2 +-
.../main.yml | 2 +-
guests/inventory | 2 +-
guests/playbooks/build/jobs/defaults.yml | 4 +-
.../playbooks/build/projects/libvirt-dbus.yml | 6 +-
.../build/projects/libvirt-go-xml.yml | 2 +-
.../playbooks/build/projects/libvirt-go.yml | 2 +-
.../build/projects/libvirt-ocaml.yml | 2 +-
.../build/projects/libvirt-sandbox.yml | 4 +-
.../playbooks/build/projects/libvirt-tck.yml | 4 +-
guests/playbooks/build/projects/libvirt.yml | 2 +-
.../build/projects/osinfo-db-tools.yml | 2 +-
guests/playbooks/build/projects/osinfo-db.yml | 2 +-
.../playbooks/build/projects/virt-manager.yml | 6 +-
.../playbooks/build/projects/virt-viewer.yml | 2 +-
guests/vars/mappings.yml | 1 -
guests/vars/vault.yml | 74 +++++++++----------
jenkins/jobs/defaults.yaml | 4 +-
jenkins/projects/libvirt-dbus.yaml | 6 +-
jenkins/projects/libvirt-go-xml.yaml | 2 +-
jenkins/projects/libvirt-go.yaml | 2 +-
jenkins/projects/libvirt-ocaml.yaml | 2 +-
jenkins/projects/libvirt-sandbox.yaml | 4 +-
jenkins/projects/libvirt-tck.yaml | 4 +-
jenkins/projects/libvirt.yaml | 2 +-
jenkins/projects/osinfo-db-tools.yaml | 2 +-
jenkins/projects/osinfo-db.yaml | 2 +-
jenkins/projects/virt-manager.yaml | 6 +-
jenkins/projects/virt-viewer.yaml | 2 +-
31 files changed, 80 insertions(+), 81 deletions(-)
delete mode 100644 guests/host_vars/libvirt-fedora-28/docker.yml
create mode 100644 guests/host_vars/libvirt-fedora-30/docker.yml
rename guests/host_vars/{libvirt-fedora-28 => libvirt-fedora-30}/install.yml (66%)
rename guests/host_vars/{libvirt-fedora-28 => libvirt-fedora-30}/main.yml (95%)
--
2.20.1
5 years, 7 months
[libvirt] [PATCH v6] tests: perform cross compiler builds on GitLab CI
by Daniel P. Berrangé
GitLab CI provides some shared build runners that use Docker containers.
This resource can usefully run cross-compiled builds since all other CI
build testing is currently x86 only, and Travis CI is already very busy
testing native builds.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
.gitlab-ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
create mode 100644 .gitlab-ci.yml
Changed in v6:
- Run jobs half & half on 9 vs sid
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000..a8a8581d9e
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,46 @@
+.job_template: &job_definition
+ script:
+ - mkdir vpath
+ - cd vpath
+ - ../autogen.sh $CONFIGURE_OPTS
+ - make -j $(getconf _NPROCESSORS_ONLN)
+
+# We could run every arch on both versions, but it is a little
+# overkill. Instead we run half the jobs on 9 and half the jobs
+# on sid to give reasonable cross-coverage.
+
+debian-9-cross-armv6l:
+ <<: *job_definition
+ image: quay.io/libvirt/buildenv-debian-9-cross-armv6l:master
+
+debian-9-cross-mipsel:
+ <<: *job_definition
+ image: quay.io/libvirt/buildenv-debian-9-cross-mipsel:master
+
+debian-9-cross-ppc64le:
+ <<: *job_definition
+ image: quay.io/libvirt/buildenv-debian-9-cross-ppc64le:master
+
+debian-9-cross-s390x:
+ <<: *job_definition
+ image: quay.io/libvirt/buildenv-debian-9-cross-s390x:master
+
+debian-sid-cross-aarch64:
+ <<: *job_definition
+ image: quay.io/libvirt/buildenv-debian-sid-cross-aarch64:master
+
+debian-sid-cross-armv7l:
+ <<: *job_definition
+ image: quay.io/libvirt/buildenv-debian-sid-cross-armv7l:master
+
+debian-sid-cross-i686:
+ <<: *job_definition
+ image: quay.io/libvirt/buildenv-debian-sid-cross-i686:master
+
+debian-sid-cross-mips64el:
+ <<: *job_definition
+ image: quay.io/libvirt/buildenv-debian-sid-cross-mips64el:master
+
+debian-sid-cross-mips:
+ <<: *job_definition
+ image: quay.io/libvirt/buildenv-debian-sid-cross-mips:master
--
2.20.1
5 years, 7 months
[libvirt] [PATCH 00/10] build: drop some old libs and relax GNU strictness
by Ján Tomko
While testing these changes I found that the build is broken with old
rbd on (unsupported) Debian 8. Fix the build by dropping support for
old rbd.
Ján Tomko (10):
rbd: depend on diff_iterate2
rbd: drop support for ceph 0.94
build: drop check for SASL1
build: require yajl >= 2.0.3
json: assume WITH_YAJL2
build: remove WITH_YAJL2
virJSONValueToString: bail out early on error
configure: split AM_INIT_AUTOMAKE into multiple lines
configure.ac: drop -Wno-obsolete from AM_INIT_AUTOMAKE
configure.ac: add foreign to AM_INIT_AUTOMAKE
config-post.h | 1 -
configure.ac | 12 ++++--
m4/virt-driver-qemu.m4 | 2 +-
m4/virt-sasl.m4 | 5 +--
m4/virt-storage-rbd.m4 | 2 +-
m4/virt-yajl.m4 | 5 +--
src/storage/storage_backend_rbd.c | 39 -------------------
src/util/virjson.c | 63 +++----------------------------
8 files changed, 19 insertions(+), 110 deletions(-)
--
2.19.2
5 years, 7 months