The package rpms/libvirt.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/libvirt.git/commit/?id=e5075407b1....
Change:
+%ifarch s390 s390x aarch64
Thanks.
Full change:
============
commit e5075407b1a7bd43755dfd33b9528bab60d1123e
Author: Cole Robinson <crobinso(a)redhat.com>
Date: Fri Aug 4 16:11:19 2017 -0400
Enable ZFS storage driver (bz #1471912)
Don't use cgroup mount points from /proc/mounts that are hidden (bz #1470593)
disk driver name=... should be optional (bz #1473091)
diff --git a/0101-spec-Add-support-for-building-the-zfs-storage-driver.patch
b/0101-spec-Add-support-for-building-the-zfs-storage-driver.patch
new file mode 100644
index 0000000..432f9c1
--- /dev/null
+++ b/0101-spec-Add-support-for-building-the-zfs-storage-driver.patch
@@ -0,0 +1,123 @@
+From: Neal Gompa <ngompa13(a)gmail.com>
+Date: Mon, 17 Jul 2017 11:32:46 -0400
+Subject: [PATCH] spec: Add support for building the zfs storage driver
+
+Where it can be supported in Fedora, the driver is built and made
+available as a subpackage.
+
+Signed-off-by: Neal Gompa <ngompa13(a)gmail.com>
+(cherry picked from commit 9af764e86aef7dfb0191a9561bf1d1abf941da05)
+---
+ libvirt.spec.in | 50 +++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 49 insertions(+), 1 deletion(-)
+
+diff --git a/libvirt.spec.in b/libvirt.spec.in
+index 079b5f386..46a3e97d1 100644
+--- a/libvirt.spec.in
++++ b/libvirt.spec.in
+@@ -71,6 +71,13 @@
+ %define with_storage_gluster 0%{!?_without_storage_gluster:1}
+ %define with_numactl 0%{!?_without_numactl:1}
+
++# F25+ has zfs-fuse
++%if 0%{?fedora} >= 25
++ %define with_storage_zfs 0%{!?_without_storage_zfs:1}
++%else
++ %define with_storage_zfs 0
++%endif
++
+ # A few optional bits off by default, we enable later
+ %define with_fuse 0%{!?_without_fuse:0}
+ %define with_cgconfig 0%{!?_without_cgconfig:0}
+@@ -115,6 +122,12 @@
+ %endif
+ %endif
+
++# zfs-fuse is not available on some architectures
++%ifarch s390 s390x aarch64
++ %define with_storage_zfs 0
++%endif
++
++
+ # RHEL doesn't ship OpenVZ, VBox, UML, PowerHypervisor,
+ # VMware, libxenserver (xenapi), libxenlight (Xen 4.1 and newer),
+ # or HyperV.
+@@ -373,6 +386,12 @@ BuildRequires: glusterfs-devel >= 3.4.1
+ %if %{with_storage_sheepdog}
+ BuildRequires: sheepdog
+ %endif
++%if %{with_storage_zfs}
++# Support any conforming implementation of zfs. On stock Fedora
++# this is zfs-fuse, but could be zfsonlinux upstream RPMs
++BuildRequires: /sbin/zfs
++BuildRequires: /sbin/zpool
++%endif
+ %if %{with_numactl}
+ # For QEMU/LXC numa info
+ BuildRequires: numactl-devel
+@@ -705,6 +724,21 @@ sheepdog volumes using.
+ %endif
+
+
++%if %{with_storage_zfs}
++%package daemon-driver-storage-zfs
++Summary: Storage driver plugin for ZFS
++Group: Development/Libraries
++Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
++# Support any conforming implementation of zfs
++Requires: /sbin/zfs
++Requires: /sbin/zpool
++
++%description daemon-driver-storage-zfs
++The storage driver backend adding implementation of the storage APIs for
++ZFS volumes.
++%endif
++
++
+ %package daemon-driver-storage
+ Summary: Storage driver plugin including all backends for the libvirtd daemon
+ Group: Development/Libraries
+@@ -723,6 +757,9 @@ Requires: libvirt-daemon-driver-storage-rbd = %{version}-%{release}
+ %if %{with_storage_sheepdog}
+ Requires: libvirt-daemon-driver-storage-sheepdog = %{version}-%{release}
+ %endif
++%if %{with_storage_zfs}
++Requires: libvirt-daemon-driver-storage-zfs = %{version}-%{release}
++%endif
+
+ %description daemon-driver-storage
+ The storage driver plugin for the libvirtd daemon, providing
+@@ -1180,6 +1217,12 @@ rm -rf .git
+ %define arg_storage_gluster --without-storage-gluster
+ %endif
+
++%if %{with_storage_zfs}
++ %define arg_storage_zfs --with-storage-zfs
++%else
++ %define arg_storage_zfs --without-storage-zfs
++%endif
++
+ %if %{with_numactl}
+ %define arg_numactl --with-numactl
+ %else
+@@ -1288,7 +1331,7 @@ rm -f po/stamp-po
+ %{?arg_storage_rbd} \
+ %{?arg_storage_sheepdog} \
+ %{?arg_storage_gluster} \
+- --without-storage-zfs \
++ %{?arg_storage_zfs} \
+ --without-storage-vstorage \
+ %{?arg_numactl} \
+ %{?arg_numad} \
+@@ -1850,6 +1893,11 @@ exit 0
+ %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_sheepdog.so
+ %endif
+
++%if %{with_storage_zfs}
++%files daemon-driver-storage-zfs
++%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_zfs.so
++%endif
++
+ %if %{with_qemu}
+ %files daemon-driver-qemu
+ %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
diff --git a/0102-Avoid-hidden-cgroup-mount-points.patch
b/0102-Avoid-hidden-cgroup-mount-points.patch
new file mode 100644
index 0000000..d443bcd
--- /dev/null
+++ b/0102-Avoid-hidden-cgroup-mount-points.patch
@@ -0,0 +1,150 @@
+From: Juan Hernandez <jhernand(a)redhat.com>
+Date: Thu, 6 Jul 2017 17:03:31 +0200
+Subject: [PATCH] Avoid hidden cgroup mount points
+
+Currently the scan of the /proc/mounts file used to find cgroup mount
+points doesn't take into account that mount points may hidden by other
+mount points. For, example in certain Kubernetes environments the
+/proc/mounts contains the following lines:
+
+ cgroup /sys/fs/cgroup/net_prio,net_cls cgroup ...
+ tmpfs /sys/fs/cgroup tmpfs ...
+ cgroup /sys/fs/cgroup/net_cls,net_prio cgroup ...
+
+In this particular environment the first mount point is hidden by the
+second one. The correct mount point is the third one, but libvirt will
+never process it because it only checks the first mount point for each
+controller (net_cls in this case). So libvirt will try to use the first
+mount point, which doesn't actually exist, and the complete detection
+process will fail.
+
+To avoid that issue this patch changes the virCgroupDetectMountsFromFile
+function so that when there are duplicates it takes the information from
+the last line in /proc/mounts. This requires removing the previous
+explicit condition to skip duplicates, and adding code to free the
+memory used by the processing of duplicated lines.
+
+Related-To:
https://bugzilla.redhat.com/1468214
+Related-To:
https://github.com/kubevirt/libvirt/issues/4
+Signed-off-by: Juan Hernandez <jhernand(a)redhat.com>
+(cherry picked from commit dacd160d7479e0ec2d8a63f102145fd30636a1c8)
+---
+ src/util/vircgroup.c | 23 ++++++++++++++---------
+ tests/vircgroupdata/kubevirt.mounts | 25 +++++++++++++++++++++++++
+ tests/vircgroupdata/kubevirt.parsed | 10 ++++++++++
+ tests/vircgrouptest.c | 1 +
+ 4 files changed, 50 insertions(+), 9 deletions(-)
+ create mode 100644 tests/vircgroupdata/kubevirt.mounts
+ create mode 100644 tests/vircgroupdata/kubevirt.parsed
+
+diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
+index 5aa1db5b1..a53908fc9 100644
+--- a/src/util/vircgroup.c
++++ b/src/util/vircgroup.c
+@@ -397,6 +397,7 @@ virCgroupDetectMountsFromFile(virCgroupPtr group,
+ const char *typestr = virCgroupControllerTypeToString(i);
+ int typelen = strlen(typestr);
+ char *tmp = entry.mnt_opts;
++ struct virCgroupController *controller = &group->controllers[i];
+ while (tmp) {
+ char *next = strchr(tmp, ',');
+ int len;
+@@ -406,18 +407,22 @@ virCgroupDetectMountsFromFile(virCgroupPtr group,
+ } else {
+ len = strlen(tmp);
+ }
+- /* NB, the same controller can appear >1 time in mount list
+- * due to bind mounts from one location to another. Pick the
+- * first entry only
+- */
+- if (typelen == len && STREQLEN(typestr, tmp, len) &&
+- !group->controllers[i].mountPoint) {
++
++ if (typelen == len && STREQLEN(typestr, tmp, len)) {
+ char *linksrc;
+ struct stat sb;
+ char *tmp2;
+
+- if (VIR_STRDUP(group->controllers[i].mountPoint,
+- entry.mnt_dir) < 0)
++ /* Note that the lines in /proc/mounts have the same
++ * order than the mount operations, and that there may
++ * be duplicates due to bind mounts. This means
++ * that the same mount point may be processed more than
++ * once. We need to save the results of the last one,
++ * and we need to be careful to release the memory used
++ * by previous processing. */
++ VIR_FREE(controller->mountPoint);
++ VIR_FREE(controller->linkPoint);
++ if (VIR_STRDUP(controller->mountPoint, entry.mnt_dir) < 0)
+ goto error;
+
+ tmp2 = strrchr(entry.mnt_dir, '/');
+@@ -453,7 +458,7 @@ virCgroupDetectMountsFromFile(virCgroupPtr group,
+ VIR_WARN("Expecting a symlink at %s for controller
%s",
+ linksrc, typestr);
+ } else {
+- group->controllers[i].linkPoint = linksrc;
++ controller->linkPoint = linksrc;
+ }
+ }
+ }
+diff --git a/tests/vircgroupdata/kubevirt.mounts b/tests/vircgroupdata/kubevirt.mounts
+new file mode 100644
+index 000000000..ca036196b
+--- /dev/null
++++ b/tests/vircgroupdata/kubevirt.mounts
+@@ -0,0 +1,25 @@
++rootfs / rootfs rw 0 0
++proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
++udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=1006404,mode=755 0 0
++devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0
++sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
++/dev/sda1 / ext4 rw,noatime,data=ordered 0 0
++tmpfs /run tmpfs rw,nodev,relatime,size=812296k,mode=755 0 0
++mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
++shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0
++debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
++cgroup_root /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755 0
0
++openrc /sys/fs/cgroup/openrc cgroup
rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc
0 0
++cpuset /some/random/location/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
++cpuset /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
++cpu /sys/fs/cgroup/cpu cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0
++cpuacct /some/random/location/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
++cpuacct /sys/fs/cgroup/cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
++memory /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
++devices /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
++freezer /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
++blkio /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
++perf_event /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0
0
++hugetlb /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0
++binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0
++freezer /some/random/location/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0
0
+diff --git a/tests/vircgroupdata/kubevirt.parsed b/tests/vircgroupdata/kubevirt.parsed
+new file mode 100644
+index 000000000..694870723
+--- /dev/null
++++ b/tests/vircgroupdata/kubevirt.parsed
+@@ -0,0 +1,10 @@
++cpu /sys/fs/cgroup/cpu
++cpuacct /sys/fs/cgroup/cpuacct
++cpuset /sys/fs/cgroup/cpuset
++memory /sys/fs/cgroup/memory
++devices /sys/fs/cgroup/devices
++freezer /some/random/location/freezer
++blkio /sys/fs/cgroup/blkio
++net_cls <null>
++perf_event /sys/fs/cgroup/perf_event
++name=systemd <null>
+diff --git a/tests/vircgrouptest.c b/tests/vircgrouptest.c
+index f55ef74a1..cf0315f16 100644
+--- a/tests/vircgrouptest.c
++++ b/tests/vircgrouptest.c
+@@ -885,6 +885,7 @@ mymain(void)
+ DETECT_MOUNTS("cgroups3");
+ DETECT_MOUNTS("all-in-one");
+ DETECT_MOUNTS("no-cgroups");
++ DETECT_MOUNTS("kubevirt");
+
+ if (virTestRun("New cgroup for self", testCgroupNewForSelf, NULL) < 0)
+ ret = -1;
diff --git a/0103-docs-schema-make-disk-driver-name-attribute-optional.patch
b/0103-docs-schema-make-disk-driver-name-attribute-optional.patch
new file mode 100644
index 0000000..d128a66
--- /dev/null
+++ b/0103-docs-schema-make-disk-driver-name-attribute-optional.patch
@@ -0,0 +1,53 @@
+From: Jim Fehlig <jfehlig(a)suse.com>
+Date: Tue, 18 Jul 2017 10:20:35 -0600
+Subject: [PATCH] docs: schema: make disk driver name attribute optional
+
+/domain/devices/disk/driver/@name is not a required or mandatory
+attribute according to formatdomain, and indeed it was agreed on
+IRC that the attribute is "optional for input, recommended (but
+not required) for output". Currently the schema requires the
+attribute, causing virt-xml-validate to fail on disk config where
+the driver name is not explicitly specified. E.g.
+
+# cat test.xml | grep -A 5 cdrom
+ <disk type='file' device='cdrom'>
+ <driver type='raw'/>
+ <target dev='hdb' bus='ide'/>
+ <readonly/>
+ <address type='drive' controller='0' bus='0'
target='0' unit='1'/>
+ </disk>
+
+# virt-xml-validate test.xml
+Relax-NG validity error : Extra element devices in interleave
+test.xml:21: element devices: Relax-NG validity error : Element domain failed to validate
content
+test.xml fails to validate
+
+Relaxing the name attribute to be optional fixes the validation
+
+# virt-xml-validate test.xml
+test.xml validates
+
+(cherry picked from commit b494e09d058f09b48d0fd8855edd557101294671)
+---
+ docs/schemas/domaincommon.rng | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
+index edc225fe5..dfc7e2470 100644
+--- a/docs/schemas/domaincommon.rng
++++ b/docs/schemas/domaincommon.rng
+@@ -1720,9 +1720,11 @@
+ </element>
+ </define>
+ <define name="driverFormat">
+- <attribute name="name">
+- <ref name="genericName"/>
+- </attribute>
++ <optional>
++ <attribute name="name">
++ <ref name="genericName"/>
++ </attribute>
++ </optional>
+ <optional>
+ <attribute name='type'>
+ <choice>
diff --git a/libvirt.spec b/libvirt.spec
index 6124d5d..177cce6 100644
--- a/libvirt.spec
+++ b/libvirt.spec
@@ -71,6 +71,13 @@
%define with_storage_gluster 0%{!?_without_storage_gluster:1}
%define with_numactl 0%{!?_without_numactl:1}
+# F25+ has zfs-fuse
+%if 0%{?fedora} >= 25
+ %define with_storage_zfs 0%{!?_without_storage_zfs:1}
+%else
+ %define with_storage_zfs 0
+%endif
+
# A few optional bits off by default, we enable later
%define with_fuse 0%{!?_without_fuse:0}
%define with_cgconfig 0%{!?_without_cgconfig:0}
@@ -115,6 +122,12 @@
%endif
%endif
+# zfs-fuse is not available on some architectures
+%ifarch s390 s390x aarch64
+ %define with_storage_zfs 0
+%endif
+
+
# RHEL doesn't ship OpenVZ, VBox, UML, PowerHypervisor,
# VMware, libxenserver (xenapi), libxenlight (Xen 4.1 and newer),
# or HyperV.
@@ -227,7 +240,7 @@
Summary: Library providing a simple virtualization API
Name: libvirt
Version: 3.2.1
-Release: 4%{?dist}%{?extra_release}
+Release: 5%{?dist}%{?extra_release}
License: LGPLv2+
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -261,6 +274,14 @@ Patch0015: 0015-cpu-Drop-feature-filtering-from-virCPUUpdate.patch
Patch0016: 0016-cpu-Introduce-virCPUGetHostIsSupported.patch
Patch0017: 0017-qemu-Use-more-data-for-comparing-CPUs.patch
+# Enable ZFS storage driver (bz #1471912)
+Patch0101: 0101-spec-Add-support-for-building-the-zfs-storage-driver.patch
+# Don't use cgroup mount points from /proc/mounts that are hidden (bz
+# #1470593)
+Patch0102: 0102-Avoid-hidden-cgroup-mount-points.patch
+# disk driver name=... should be optional (bz #1473091)
+Patch0103: 0103-docs-schema-make-disk-driver-name-attribute-optional.patch
+
Requires: libvirt-daemon = %{version}-%{release}
Requires: libvirt-daemon-config-network = %{version}-%{release}
Requires: libvirt-daemon-config-nwfilter = %{version}-%{release}
@@ -396,6 +417,12 @@ BuildRequires: glusterfs-devel >= 3.4.1
%if %{with_storage_sheepdog}
BuildRequires: sheepdog
%endif
+%if %{with_storage_zfs}
+# Support any conforming implementation of zfs. On stock Fedora
+# this is zfs-fuse, but could be zfsonlinux upstream RPMs
+BuildRequires: /sbin/zfs
+BuildRequires: /sbin/zpool
+%endif
%if %{with_numactl}
# For QEMU/LXC numa info
BuildRequires: numactl-devel
@@ -728,6 +755,21 @@ sheepdog volumes using.
%endif
+%if %{with_storage_zfs}
+%package daemon-driver-storage-zfs
+Summary: Storage driver plugin for ZFS
+Group: Development/Libraries
+Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
+# Support any conforming implementation of zfs
+Requires: /sbin/zfs
+Requires: /sbin/zpool
+
+%description daemon-driver-storage-zfs
+The storage driver backend adding implementation of the storage APIs for
+ZFS volumes.
+%endif
+
+
%package daemon-driver-storage
Summary: Storage driver plugin including all backends for the libvirtd daemon
Group: Development/Libraries
@@ -746,6 +788,9 @@ Requires: libvirt-daemon-driver-storage-rbd = %{version}-%{release}
%if %{with_storage_sheepdog}
Requires: libvirt-daemon-driver-storage-sheepdog = %{version}-%{release}
%endif
+%if %{with_storage_zfs}
+Requires: libvirt-daemon-driver-storage-zfs = %{version}-%{release}
+%endif
%description daemon-driver-storage
The storage driver plugin for the libvirtd daemon, providing
@@ -1203,6 +1248,12 @@ rm -rf .git
%define arg_storage_gluster --without-storage-gluster
%endif
+%if %{with_storage_zfs}
+ %define arg_storage_zfs --with-storage-zfs
+%else
+ %define arg_storage_zfs --without-storage-zfs
+%endif
+
%if %{with_numactl}
%define arg_numactl --with-numactl
%else
@@ -1311,7 +1362,7 @@ rm -f po/stamp-po
%{?arg_storage_rbd} \
%{?arg_storage_sheepdog} \
%{?arg_storage_gluster} \
- --without-storage-zfs \
+ %{?arg_storage_zfs} \
--without-storage-vstorage \
%{?arg_numactl} \
%{?arg_numad} \
@@ -1873,6 +1924,11 @@ exit 0
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_sheepdog.so
%endif
+%if %{with_storage_zfs}
+%files daemon-driver-storage-zfs
+%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_zfs.so
+%endif
+
%if %{with_qemu}
%files daemon-driver-qemu
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/
@@ -2092,6 +2148,12 @@ exit 0
%changelog
+* Fri Aug 04 2017 Cole Robinson <crobinso(a)redhat.com> - 3.2.1-5
+- Enable ZFS storage driver (bz #1471912)
+- Don't use cgroup mount points from /proc/mounts that are hidden (bz
+ #1470593)
+- disk driver name=... should be optional (bz #1473091)
+
* Wed Jul 12 2017 Cole Robinson <crobinso(a)redhat.com> - 3.2.1-4
- Fix resuming qemu VMs suspended before libvirt 3.2.0
- Fix issues with AMD CPU models, and some others