libvirt-6.8.0-1
Update to version 6.8.0
This commit is contained in:
parent
b94fb6a393
commit
037cd36ba2
@ -1,79 +0,0 @@
|
||||
From 8abd1ffed18394a6212c469cb2c7b6cc28a122d2 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Thu, 3 Sep 2020 18:07:43 +0200
|
||||
Subject: [PATCH] qemu_namespace: Be tolerant to non-existent files when
|
||||
populating /dev
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In 6.7.0 release I've changed how domain namespace is built and
|
||||
populated. Previously it used to be done from a pre-exec hook
|
||||
(ran in the forked off child, just before dropping all privileges
|
||||
and exec()-ing QEMU), which not only meant we had to have two
|
||||
different code paths for creating a node in domain's namespace
|
||||
(one for this pre-exec hook, the other for hotplug ran from the
|
||||
daemon), it also proved problematic because it was leaking FDs
|
||||
into QEMU process.
|
||||
|
||||
To mitigate this problem, we've not only ditched libdevmapper
|
||||
from the NS population process, I've also dropped the pre-exec
|
||||
code and let the NS be populated from the daemon (using the
|
||||
hotplug code). But, I was not careful when doing so, because the
|
||||
pre-exec code was tolerant to files that doesn't exist, while
|
||||
this new code isn't. For instance, the very first thing that is
|
||||
done when the new NS is created is it's populated with
|
||||
@defaultDeviceACL which contain files like /dev/null, /dev/zero,
|
||||
/dev/random and /dev/kvm (and others). While the rest will
|
||||
probably exist every time, /dev/kvm might not and thus the new
|
||||
code I wrote has to be tolerant to that.
|
||||
|
||||
Of course, users can override the @defaultDeviceACL (by setting
|
||||
cgroup_device_acl in qemu.conf) and remove /dev/kvm (which is
|
||||
acceptable workaround), but we definitely want libvirt to work
|
||||
out of the box even on hosts without KVM.
|
||||
|
||||
Fixes: 9048dc4e627ddf33996084167bece7b5fb83b0bc
|
||||
Reported-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_namespace.c | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c
|
||||
index 454d6a7b4d..87f4fd8d58 100644
|
||||
--- a/src/qemu/qemu_namespace.c
|
||||
+++ b/src/qemu/qemu_namespace.c
|
||||
@@ -1094,6 +1094,9 @@ qemuNamespaceMknodItemInit(qemuNamespaceMknodItemPtr item,
|
||||
item->file = file;
|
||||
|
||||
if (g_lstat(file, &item->sb) < 0) {
|
||||
+ if (errno == ENOENT)
|
||||
+ return -2;
|
||||
+
|
||||
virReportSystemError(errno,
|
||||
_("Unable to access %s"), file);
|
||||
return -1;
|
||||
@@ -1168,9 +1171,16 @@ qemuNamespacePrepareOneItem(qemuNamespaceMknodDataPtr data,
|
||||
|
||||
while (1) {
|
||||
qemuNamespaceMknodItem item = { 0 };
|
||||
+ int rc;
|
||||
|
||||
- if (qemuNamespaceMknodItemInit(&item, cfg, vm, next) < 0)
|
||||
+ rc = qemuNamespaceMknodItemInit(&item, cfg, vm, next);
|
||||
+ if (rc == -2) {
|
||||
+ /* @file doesn't exist. We can break here. */
|
||||
+ break;
|
||||
+ } else if (rc < 0) {
|
||||
+ /* Some other (critical) error. */
|
||||
return -1;
|
||||
+ }
|
||||
|
||||
if (STRPREFIX(next, QEMU_DEVPREFIX)) {
|
||||
for (i = 0; i < ndevMountsPath; i++) {
|
||||
--
|
||||
2.26.2
|
||||
|
20
libvirt.spec
20
libvirt.spec
@ -32,7 +32,7 @@
|
||||
%endif
|
||||
|
||||
# On RHEL 7 and older macro _vpath_builddir is not defined.
|
||||
%if 0%{?rhel} <= 7
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
%define _vpath_builddir %{_target_platform}
|
||||
%endif
|
||||
|
||||
@ -210,8 +210,8 @@
|
||||
|
||||
Summary: Library providing a simple virtualization API
|
||||
Name: libvirt
|
||||
Version: 6.7.0
|
||||
Release: 2%{?dist}
|
||||
Version: 6.8.0
|
||||
Release: 1%{?dist}
|
||||
License: LGPLv2+
|
||||
URL: https://libvirt.org/
|
||||
|
||||
@ -219,7 +219,6 @@ URL: https://libvirt.org/
|
||||
%define mainturl stable_updates/
|
||||
%endif
|
||||
Source: https://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.xz
|
||||
Patch1: 0001-qemu_namespace-Be-tolerant-to-non-existent-files-whe.patch
|
||||
|
||||
Requires: libvirt-daemon = %{version}-%{release}
|
||||
Requires: libvirt-daemon-config-network = %{version}-%{release}
|
||||
@ -375,9 +374,6 @@ BuildRequires: util-linux
|
||||
# For showmount in FS driver (netfs discovery)
|
||||
BuildRequires: nfs-utils
|
||||
|
||||
# Communication with the firewall and polkit daemons use DBus
|
||||
BuildRequires: dbus-devel
|
||||
|
||||
# Fedora build root suckage
|
||||
BuildRequires: gawk
|
||||
|
||||
@ -892,7 +888,6 @@ capabilities of VirtualBox
|
||||
%package client
|
||||
Summary: Client side utilities of the libvirt library
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: readline
|
||||
# Needed by /usr/libexec/libvirt-guests.sh script.
|
||||
Requires: gettext
|
||||
# Needed by virt-pki-validate script.
|
||||
@ -919,7 +914,6 @@ Shared libraries for accessing the libvirt daemon.
|
||||
%package admin
|
||||
Summary: Set of tools to control libvirt daemon
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: readline
|
||||
%if %{with_bash_completion}
|
||||
Requires: %{name}-bash-completion = %{version}-%{release}
|
||||
%endif
|
||||
@ -1169,7 +1163,6 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec)
|
||||
%{?arg_selinux_mount} \
|
||||
-Dapparmor=disabled \
|
||||
-Dsecdriver_apparmor=disabled \
|
||||
-Dhal=disabled \
|
||||
-Dudev=enabled \
|
||||
-Dyajl=enabled \
|
||||
%{?arg_sanlock} \
|
||||
@ -1486,7 +1479,7 @@ exit 0
|
||||
%files
|
||||
|
||||
%files docs
|
||||
%doc AUTHORS NEWS.rst README.rst
|
||||
%doc AUTHORS.rst NEWS.rst README.rst
|
||||
%doc libvirt-docs/*
|
||||
|
||||
%files daemon
|
||||
@ -1560,6 +1553,8 @@ exit 0
|
||||
|
||||
%attr(0755, root, root) %{_libexecdir}/libvirt_iohelper
|
||||
|
||||
%attr(0755, root, root) %{_bindir}/virt-ssh-helper
|
||||
|
||||
%attr(0755, root, root) %{_sbindir}/libvirtd
|
||||
%attr(0755, root, root) %{_sbindir}/virtproxyd
|
||||
%attr(0755, root, root) %{_sbindir}/virtlogd
|
||||
@ -1965,6 +1960,9 @@ exit 0
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Oct 01 2020 Cole Robinson <crobinso@redhat.com> - 6.8.0-1
|
||||
- Update to version 6.8.0
|
||||
|
||||
* Fri Sep 4 2020 Daniel P. Berrangé <berrange@redhat.com> - 6.7.0-2
|
||||
- Fix QEMU start when KVM is not loaded (rhbz#1875327)
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (libvirt-6.7.0.tar.xz) = cabfb6aa65a3a1412b0111654ad3a7d0a6dfc63399a892c540ca39ab4e56f87626a067037e4480bb55418a371d2b5e9ac74862c92a3cdea69822ec3d158d769f
|
||||
SHA512 (libvirt-6.8.0.tar.xz) = 9b69f3dcceb5e40470a78908654faf51b643f6793e556f3115daa4bfe08743af290882dd51f15eb27c38d589eb210d495de7c44a40b363420ab4f4d3a6393cc9
|
||||
|
Loading…
Reference in New Issue
Block a user