Update to 1.2.18 release
This commit is contained in:
parent
ce7b23d9d0
commit
dbe61507bd
@ -1,63 +0,0 @@
|
||||
From 699faeacb10459fed748d425eb044ef69697e804 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Kletzander <mkletzan@redhat.com>
|
||||
Date: Fri, 10 Jul 2015 10:34:52 +0200
|
||||
Subject: [PATCH] rpc: Add virNetDaemonHasClients
|
||||
|
||||
So callers don't have to iterate over each server.
|
||||
|
||||
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
||||
---
|
||||
src/libvirt_remote.syms | 1 +
|
||||
src/rpc/virnetdaemon.c | 13 +++++++++++++
|
||||
src/rpc/virnetdaemon.h | 2 ++
|
||||
3 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/src/libvirt_remote.syms b/src/libvirt_remote.syms
|
||||
index e6ca041..6bfdcfa 100644
|
||||
--- a/src/libvirt_remote.syms
|
||||
+++ b/src/libvirt_remote.syms
|
||||
@@ -65,6 +65,7 @@ virNetDaemonAddSignalHandler;
|
||||
virNetDaemonAutoShutdown;
|
||||
virNetDaemonClose;
|
||||
virNetDaemonGetServer;
|
||||
+virNetDaemonHasClients;
|
||||
virNetDaemonIsPrivileged;
|
||||
virNetDaemonNew;
|
||||
virNetDaemonNewPostExecRestart;
|
||||
diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c
|
||||
index 67dff14..6b13282 100644
|
||||
--- a/src/rpc/virnetdaemon.c
|
||||
+++ b/src/rpc/virnetdaemon.c
|
||||
@@ -747,3 +747,16 @@ virNetDaemonClose(virNetDaemonPtr dmn)
|
||||
|
||||
virObjectUnlock(dmn);
|
||||
}
|
||||
+
|
||||
+bool
|
||||
+virNetDaemonHasClients(virNetDaemonPtr dmn)
|
||||
+{
|
||||
+ size_t i = 0;
|
||||
+
|
||||
+ for (i = 0; i < dmn->nservers; i++) {
|
||||
+ if (virNetServerHasClients(dmn->servers[i]))
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
diff --git a/src/rpc/virnetdaemon.h b/src/rpc/virnetdaemon.h
|
||||
index 9e176d6..bb32053 100644
|
||||
--- a/src/rpc/virnetdaemon.h
|
||||
+++ b/src/rpc/virnetdaemon.h
|
||||
@@ -76,6 +76,8 @@ void virNetDaemonQuit(virNetDaemonPtr dmn);
|
||||
|
||||
void virNetDaemonClose(virNetDaemonPtr dmn);
|
||||
|
||||
+bool virNetDaemonHasClients(virNetDaemonPtr dmn);
|
||||
+
|
||||
virNetServerPtr virNetDaemonGetServer(virNetDaemonPtr dmn,
|
||||
int subServerID);
|
||||
|
||||
--
|
||||
2.4.3
|
||||
|
@ -1,59 +0,0 @@
|
||||
From b7ea58c262194037042284a14fb1608c9cf31884 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Kletzander <mkletzan@redhat.com>
|
||||
Date: Fri, 10 Jul 2015 10:35:31 +0200
|
||||
Subject: [PATCH] rpc: Rework timerActive logic in daemon
|
||||
|
||||
Daemon used false logic for determining whether there were any clients.
|
||||
When the timer was inactive, it was activated if at least one of the
|
||||
servers did not have clients. So the bool was being flipped there and
|
||||
back all the time in case there was one client, for example.
|
||||
|
||||
Initially introduced by fa1420736882.
|
||||
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1240283
|
||||
|
||||
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
||||
---
|
||||
src/rpc/virnetdaemon.c | 24 +++++++++---------------
|
||||
1 file changed, 9 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c
|
||||
index 6b13282..910f266 100644
|
||||
--- a/src/rpc/virnetdaemon.c
|
||||
+++ b/src/rpc/virnetdaemon.c
|
||||
@@ -682,23 +682,17 @@ virNetDaemonRun(virNetDaemonPtr dmn)
|
||||
*/
|
||||
if (dmn->autoShutdownTimeout) {
|
||||
if (timerActive) {
|
||||
- for (i = 0; i < dmn->nservers; i++) {
|
||||
- if (virNetServerHasClients(dmn->servers[i])) {
|
||||
- VIR_DEBUG("Deactivating shutdown timer %d", timerid);
|
||||
- virEventUpdateTimeout(timerid, -1);
|
||||
- timerActive = false;
|
||||
- break;
|
||||
- }
|
||||
+ if (virNetDaemonHasClients(dmn)) {
|
||||
+ VIR_DEBUG("Deactivating shutdown timer %d", timerid);
|
||||
+ virEventUpdateTimeout(timerid, -1);
|
||||
+ timerActive = false;
|
||||
}
|
||||
} else {
|
||||
- for (i = 0; i < dmn->nservers; i++) {
|
||||
- if (!virNetServerHasClients(dmn->servers[i])) {
|
||||
- VIR_DEBUG("Activating shutdown timer %d", timerid);
|
||||
- virEventUpdateTimeout(timerid,
|
||||
- dmn->autoShutdownTimeout * 1000);
|
||||
- timerActive = true;
|
||||
- break;
|
||||
- }
|
||||
+ if (!virNetDaemonHasClients(dmn)) {
|
||||
+ VIR_DEBUG("Activating shutdown timer %d", timerid);
|
||||
+ virEventUpdateTimeout(timerid,
|
||||
+ dmn->autoShutdownTimeout * 1000);
|
||||
+ timerActive = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.4.3
|
||||
|
16
libvirt.spec
16
libvirt.spec
@ -377,8 +377,8 @@
|
||||
|
||||
Summary: Library providing a simple virtualization API
|
||||
Name: libvirt
|
||||
Version: 1.2.17
|
||||
Release: 2%{?dist}%{?extra_release}
|
||||
Version: 1.2.18
|
||||
Release: 1%{?dist}%{?extra_release}
|
||||
License: LGPLv2+
|
||||
Group: Development/Libraries
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
@ -389,12 +389,6 @@ URL: http://libvirt.org/
|
||||
%endif
|
||||
Source: http://libvirt.org/sources/%{?mainturl}libvirt-%{version}.tar.gz
|
||||
|
||||
# Upstream commit 699faeacb10459fed748d425eb044ef69697e804.
|
||||
Patch1: 0001-rpc-Add-virNetDaemonHasClients.patch
|
||||
|
||||
# Upstream commit b7ea58c262194037042284a14fb1608c9cf31884.
|
||||
Patch2: 0001-rpc-Rework-timerActive-logic-in-daemon.patch
|
||||
|
||||
%if %{with_libvirtd}
|
||||
Requires: libvirt-daemon = %{version}-%{release}
|
||||
%if %{with_network}
|
||||
@ -1654,8 +1648,7 @@ done
|
||||
if ! make check VIR_TEST_DEBUG=1
|
||||
then
|
||||
cat test-suite.log || true
|
||||
# Disable test suite, 1.2.17 is failing on i686 rawhide
|
||||
#exit 1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
%if %{with_libvirtd}
|
||||
@ -2337,6 +2330,9 @@ exit 0
|
||||
%doc examples/systemtap
|
||||
|
||||
%changelog
|
||||
* Tue Aug 4 2015 Daniel P. Berrange <berrange@redhat.com> - 1.2.18-1
|
||||
- Update to 1.2.18 release
|
||||
|
||||
* Wed Jul 29 2015 Richard W.M. Jones <rjones@redhat.com> - 1.2.17-2
|
||||
- Fix 'Cannot write data: Broken pipe [code=38 domain=7]' (RHBZ#1247746).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user