From 64d74cfa3e7f021e6b29523858620049a9b3c553 Mon Sep 17 00:00:00 2001 From: Boris Ranto Date: Wed, 14 Dec 2016 00:13:03 +0100 Subject: [PATCH] New version (1:10.2.4-2) This syncs up with the upstream 10.2.5 Doing it this way because of broken lookaside cache Fix the -devel obsoletes --- ...pe-avoid-returning-0-on-poll-timeout.patch | 43 +++++++++++++++++++ ceph.spec | 21 ++++++--- 2 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 0002-msg-simple-Pipe-avoid-returning-0-on-poll-timeout.patch diff --git a/0002-msg-simple-Pipe-avoid-returning-0-on-poll-timeout.patch b/0002-msg-simple-Pipe-avoid-returning-0-on-poll-timeout.patch new file mode 100644 index 0000000..224d2f0 --- /dev/null +++ b/0002-msg-simple-Pipe-avoid-returning-0-on-poll-timeout.patch @@ -0,0 +1,43 @@ +From f7abffec751e454d119df273dc6e49e5f7106078 Mon Sep 17 00:00:00 2001 +From: Sage Weil +Date: Wed, 7 Dec 2016 18:25:55 -0600 +Subject: [PATCH] msg/simple/Pipe: avoid returning 0 on poll timeout + +If poll times out it will return 0 (no data to read on socket). In +165e5abdbf6311974d4001e43982b83d06f9e0cc we changed tcp_read_wait from +returning -1 to returning -errno, which means we return 0 instead of -1 +in this case. + +This makes tcp_read() get into an infinite loop by repeatedly trying to +read from the socket and getting EAGAIN. + +Fix by explicitly checking for a 0 return from poll(2) and returning +EAGAIN in that case. + +Fixes: http://tracker.ceph.com/issues/18184 +Signed-off-by: Sage Weil +(cherry picked from commit 6c3d015c6854a12cda40673848813d968ff6afae) +--- + src/msg/simple/Pipe.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/msg/simple/Pipe.cc b/src/msg/simple/Pipe.cc +index 80b948d..cfb1986 100644 +--- a/src/msg/simple/Pipe.cc ++++ b/src/msg/simple/Pipe.cc +@@ -2500,8 +2500,11 @@ int Pipe::tcp_read_wait() + if (has_pending_data()) + return 0; + +- if (poll(&pfd, 1, msgr->timeout) <= 0) ++ int r = poll(&pfd, 1, msgr->timeout); ++ if (r < 0) + return -errno; ++ if (r == 0) ++ return -EAGAIN; + + evmask = POLLERR | POLLHUP | POLLNVAL; + #if defined(__linux__) +-- +2.7.4 + diff --git a/ceph.spec b/ceph.spec index 7e65cbc..42043f1 100644 --- a/ceph.spec +++ b/ceph.spec @@ -57,7 +57,7 @@ ################################################################################# Name: ceph Version: 10.2.4 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 Summary: User space components of the Ceph file system License: LGPL-2.1 and CC-BY-SA-1.0 and GPL-2.0 and BSL-1.0 and GPL-2.0-with-autoconf-exception and BSD-3-Clause and MIT @@ -67,6 +67,7 @@ Group: System/Filesystems URL: http://ceph.com/ Source0: http://ceph.com/download/%{name}-%{version}.tar.gz Patch1: 0001-Disable-erasure_codelib-neon-build.patch +Patch2: 0002-msg-simple-Pipe-avoid-returning-0-on-poll-timeout.patch %if 0%{?suse_version} %if 0%{?is_opensuse} ExclusiveArch: x86_64 aarch64 ppc64 ppc64le @@ -383,7 +384,7 @@ License: LGPL-2.0 Requires: librados2 = %{epoch}:%{version}-%{release} Obsoletes: ceph-devel < %{epoch}:%{version}-%{release} Provides: librados2-devel = %{epoch}:%{version}-%{release} -Obsoletes: librados2-devel = %{epoch}:%{version}-%{release} +Obsoletes: librados2-devel < %{epoch}:%{version}-%{release} %description -n librados-devel This package contains libraries and headers needed to develop programs that use RADOS object store. @@ -403,7 +404,7 @@ Group: Development/Libraries License: LGPL-2.0 Requires: librados2 = %{epoch}:%{version}-%{release} Provides: librgw2-devel = %{epoch}:%{version}-%{release} -Obsoletes: librgw2-devel = %{epoch}:%{version}-%{release} +Obsoletes: librgw2-devel < %{epoch}:%{version}-%{release} %description -n librgw-devel This package contains libraries and headers needed to develop programs that use RADOS gateway client library. @@ -436,7 +437,7 @@ Requires: libradosstriper1 = %{epoch}:%{version}-%{release} Requires: librados-devel = %{epoch}:%{version}-%{release} Obsoletes: ceph-devel < %{epoch}:%{version}-%{release} Provides: libradosstriper1-devel = %{epoch}:%{version}-%{release} -Obsoletes: libradosstriper1-devel = %{epoch}:%{version}-%{release} +Obsoletes: libradosstriper1-devel < %{epoch}:%{version}-%{release} %description -n libradosstriper-devel This package contains libraries and headers needed to develop programs that use RADOS striping interface. @@ -463,7 +464,7 @@ Requires: librbd1 = %{epoch}:%{version}-%{release} Requires: librados-devel = %{epoch}:%{version}-%{release} Obsoletes: ceph-devel < %{epoch}:%{version}-%{release} Provides: librbd1-devel = %{epoch}:%{version}-%{release} -Obsoletes: librbd1-devel = %{epoch}:%{version}-%{release} +Obsoletes: librbd1-devel < %{epoch}:%{version}-%{release} %description -n librbd-devel This package contains libraries and headers needed to develop programs that use RADOS block device. @@ -501,7 +502,7 @@ Requires: libcephfs1 = %{epoch}:%{version}-%{release} Requires: librados-devel = %{epoch}:%{version}-%{release} Obsoletes: ceph-devel < %{epoch}:%{version}-%{release} Provides: libcephfs1-devel = %{epoch}:%{version}-%{release} -Obsoletes: libcephfs1-devel = %{epoch}:%{version}-%{release} +Obsoletes: libcephfs1-devel < %{epoch}:%{version}-%{release} %description -n libcephfs-devel This package contains libraries and headers needed to develop programs that use Cephs distributed file system. @@ -546,7 +547,7 @@ Requires: java Requires: libcephfs_jni1 = %{epoch}:%{version}-%{release} Obsoletes: ceph-devel < %{epoch}:%{version}-%{release} Provides: libcephfs_jni1-devel = %{epoch}:%{version}-%{release} -Obsoletes: libcephfs_jni1-devel = %{epoch}:%{version}-%{release} +Obsoletes: libcephfs_jni1-devel < %{epoch}:%{version}-%{release} %description -n libcephfs_jni-devel This package contains the development files for CephFS Java Native Interface library. @@ -1551,6 +1552,12 @@ exit 0 %changelog +* Wed Dec 14 2016 Boris Ranto - 1:10.2.4-2 +- New version (1:10.2.4-2) +- This syncs up with the upstream 10.2.5 +- Doing it this way because of broken lookaside cache +- Fix the -devel obsoletes + * Thu Dec 08 2016 Boris Ranto - 1:10.2.4-1 - New version (1:10.2.4-1) - Disable erasure_codelib neon build