Compare commits

...

7 Commits

Author SHA1 Message Date
Boris Ranto af48e05750 Reflect file list changes in the new release 2015-07-22 16:35:10 +02:00
Boris Ranto 21ee093831 Rebase to 0.80.10 2015-07-22 15:55:12 +02:00
Boris Ranto ef6cebb5fd Rebase to 0.80.9 2015-03-11 17:17:02 +01:00
Boris Ranto 61198a290b Fix a typo v2 2015-03-04 19:28:00 +01:00
Boris Ranto c2f40f6bf6 Fix a typo 2015-03-04 19:13:34 +01:00
Boris Ranto cba5e9554c Fix several issues with spec file
- Perform a hardened build
- Use git-formatted patches
- Do not remove conf files on uninstall
- Remove the cleanup post-script function
2015-03-04 19:11:17 +01:00
Boris Ranto c01db1f5b0 Rebase to ceph-0.80.8 2015-02-23 19:14:58 +01:00
9 changed files with 84 additions and 140 deletions
@@ -0,0 +1,27 @@
From 6c280200b42758d3e84cfd1a5b256171cab132d1 Mon Sep 17 00:00:00 2001
From: Boris Ranto <branto@redhat.com>
Date: Wed, 14 Jan 2015 07:46:56 +0100
Subject: [PATCH 1/3] gperftools deprecated google/* includes
---
src/perfglue/heap_profiler.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/perfglue/heap_profiler.cc b/src/perfglue/heap_profiler.cc
index 6b079b8..cdd5ccb 100644
--- a/src/perfglue/heap_profiler.cc
+++ b/src/perfglue/heap_profiler.cc
@@ -12,8 +12,8 @@
*
*/
-#include <google/heap-profiler.h>
-#include <google/malloc_extension.h>
+#include <gperftools/heap-profiler.h>
+#include <gperftools/malloc_extension.h>
#include "heap_profiler.h"
#include "common/environment.h"
#include "common/LogClient.h"
--
1.9.3
@@ -0,0 +1,25 @@
From 213613337d56bf1b1257f043c7b737ee86b0e1be Mon Sep 17 00:00:00 2001
From: Boris Ranto <branto@redhat.com>
Date: Wed, 14 Jan 2015 07:47:47 +0100
Subject: [PATCH 2/3] -Wno-format causes compiler options collision
---
src/test/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index 69f9e84..9ede275 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -646,7 +646,7 @@ bin_DEBUGPROGRAMS += ceph_test_librbd
if LINUX
ceph_test_librbd_fsx_SOURCES = test/librbd/fsx.c
ceph_test_librbd_fsx_LDADD = $(LIBRBD) $(LIBRADOS) -lm
-ceph_test_librbd_fsx_CFLAGS = ${AM_CFLAGS} -Wno-format
+ceph_test_librbd_fsx_CFLAGS = ${AM_CFLAGS}
bin_DEBUGPROGRAMS += ceph_test_librbd_fsx
endif
--
1.9.3
@@ -1,14 +1,14 @@
From 922247e25bfb64bdbe43dd8133881aaf405b8a0b Mon Sep 17 00:00:00 2001
From 149481ac6dc52a852fb53800384a99e3d69ad11a Mon Sep 17 00:00:00 2001
From: Boris Ranto <branto@redhat.com>
Date: Mon, 8 Dec 2014 08:36:37 +0100
Subject: [PATCH] Backport pull request #2937 to firefly
Subject: [PATCH 3/3] Backport pull request #2937 to firefly
---
src/common/RWLock.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/common/RWLock.h b/src/common/RWLock.h
index f901ac0..4699b66 100644
index f901ac0..f4d1937 100644
--- a/src/common/RWLock.h
+++ b/src/common/RWLock.h
@@ -36,7 +36,9 @@ public:
@@ -23,5 +23,5 @@ index f901ac0..4699b66 100644
}
--
2.1.3
1.9.3
-31
View File
@@ -1,31 +0,0 @@
From 11995b329045341c17553269267cfd3688a51b0f Mon Sep 17 00:00:00 2001
From: Dan Mick <dan.mick@redhat.com>
Date: Wed, 10 Dec 2014 13:19:53 -0800
Subject: [PATCH 2/2] Call Rados.shutdown() explicitly before exit
This is mostly a demonstration of good behavior, as the resources will
be reclaimed on exit anyway.
Signed-off-by: Dan Mick <dan.mick@redhat.com>
(cherry picked from commit b038e8fbf9103cc42a4cde734b3ee601af6019ea)
---
src/ceph.in | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/ceph.in b/src/ceph.in
index 82c9085..c5b97ef 100755
--- a/src/ceph.in
+++ b/src/ceph.in
@@ -841,4 +841,8 @@ def main():
return 0
if __name__ == '__main__':
- sys.exit(main())
+ retval = main()
+ # shutdown explicitly; Rados() does not
+ if cluster_handle:
+ cluster_handle.shutdown()
+ sys.exit(retval)
--
1.9.3
-13
View File
@@ -1,13 +0,0 @@
--- ceph-0.80.5/src/perfglue/heap_profiler.cc.orig 2014-08-15 16:05:00.161794290 +0200
+++ ceph-0.80.5/src/perfglue/heap_profiler.cc 2014-08-15 16:05:04.691794305 +0200
@@ -12,8 +12,8 @@
*
*/
-#include <google/heap-profiler.h>
-#include <google/malloc_extension.h>
+#include <gperftools/heap-profiler.h>
+#include <gperftools/malloc_extension.h>
#include "heap_profiler.h"
#include "common/environment.h"
#include "common/LogClient.h"
-11
View File
@@ -1,11 +0,0 @@
--- ceph-0.80.5/src/test/Makefile.am.orig 2014-08-15 16:30:18.831799418 +0200
+++ ceph-0.80.5/src/test/Makefile.am 2014-08-15 16:23:17.758464663 +0200
@@ -642,7 +642,7 @@ bin_DEBUGPROGRAMS += ceph_test_librbd
if LINUX
ceph_test_librbd_fsx_SOURCES = test/librbd/fsx.c
ceph_test_librbd_fsx_LDADD = $(LIBRBD) $(LIBRADOS) -lm
-ceph_test_librbd_fsx_CFLAGS = ${AM_CFLAGS} -Wno-format
+ceph_test_librbd_fsx_CFLAGS = ${AM_CFLAGS}
bin_DEBUGPROGRAMS += ceph_test_librbd_fsx
endif
-61
View File
@@ -1,61 +0,0 @@
From e00270b51896f168d5013b7dc92ec7f8b9e19da3 Mon Sep 17 00:00:00 2001
From: Dan Mick <dan.mick@redhat.com>
Date: Wed, 10 Dec 2014 13:19:16 -0800
Subject: [PATCH 1/2] rados.py: remove Rados.__del__(); it just causes problems
Recent versions of Python contain a change to thread shutdown that
causes ceph to hang on exit; see http://bugs.python.org/issue21963.
As it turns out, this is relatively easy to avoid by not spawning
threads on exit, as Rados.__del__() will certainly do by calling
shutdown(); I suspect, but haven't proven, that the problem is
that shutdown() tries to start() a threading.Thread() that never
makes it all the way back to signal start().
Also add a PendingReleaseNote and extra doc comments to clarify.
Fixes: #8797
Signed-off-by: Dan Mick <dan.mick@redhat.com>
(cherry picked from commit 5ba9b8f21f8010c59dd84a0ef2acfec99e4b048f)
Conflicts:
PendingReleaseNotes
---
src/pybind/rados.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/pybind/rados.py b/src/pybind/rados.py
index 0fbd10e..ec68919 100644
--- a/src/pybind/rados.py
+++ b/src/pybind/rados.py
@@ -246,7 +246,8 @@ Rados object in state %s." % (self.state))
def shutdown(self):
"""
- Disconnects from the cluster.
+ Disconnects from the cluster. Call this explicitly when a
+ Rados.connect()ed object is no longer used.
"""
if (self.__dict__.has_key("state") and self.state != "shutdown"):
run_in_thread(self.librados.rados_shutdown, (self.cluster,))
@@ -260,9 +261,6 @@ Rados object in state %s." % (self.state))
self.shutdown()
return False
- def __del__(self):
- self.shutdown()
-
def version(self):
"""
Get the version number of the ``librados`` C library.
@@ -410,7 +408,7 @@ Rados object in state %s." % (self.state))
def connect(self, timeout=0):
"""
- Connect to the cluster.
+ Connect to the cluster. Use shutdown() to release resources.
"""
self.require_state("configuring")
ret = run_in_thread(self.librados.rados_connect, (self.cluster,),
--
1.9.3
+27 -19
View File
@@ -5,23 +5,22 @@
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
%global _hardened_build 1
#################################################################################
# common
#################################################################################
Name: ceph
Version: 0.80.7
Release: 3%{?dist}
Version: 0.80.10
Release: 1%{?dist}
Epoch: 1
Summary: User space components of the Ceph file system
License: GPLv2
Group: System Environment/Base
URL: http://ceph.com/
Source0: http://ceph.com/download/%{name}-%{version}.tar.bz2
Patch0: ceph-google-gperftools.patch
Patch1: ceph-no-format-security.patch
Patch2: ceph-common-do-not-unlock-rwlock-on-destruction.patch
Patch3: ceph-remove-rados-py-destructor.patch
Patch4: ceph-call-rados-shutdown-explicitly.patch
Patch1: 0001-gperftools-deprecated-google-includes.patch
Patch2: 0002-Wno-format-causes-compiler-options-collision.patch
Requires: librbd1 = %{epoch}:%{version}-%{release}
Requires: librados2 = %{epoch}:%{version}-%{release}
Requires: libcephfs1 = %{epoch}:%{version}-%{release}
@@ -68,8 +67,7 @@ BuildRequires: leveldb-devel > 1.2
%if ! ( 0%{?rhel} && 0%{?rhel} <= 6 )
BuildRequires: xfsprogs-devel
%endif
# No yasm dependency for now, it causes selinux issues
#BuildRequires: yasm
BuildRequires: yasm
%if 0%{?rhel} || 0%{?centos} || 0%{?fedora}
BuildRequires: snappy-devel
%endif
@@ -391,11 +389,8 @@ python-cephfs instead.
#################################################################################
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
# Find jni.h
@@ -608,6 +603,7 @@ fi
%config %{_sysconfdir}/bash_completion.d/ceph
%config(noreplace) %{_sysconfdir}/logrotate.d/ceph
%config(noreplace) %{_sysconfdir}/logrotate.d/radosgw
%{_mandir}/man8/ceph-disk.8*
%{_mandir}/man8/ceph-mon.8*
%{_mandir}/man8/ceph-mds.8*
%{_mandir}/man8/ceph-osd.8*
@@ -669,7 +665,6 @@ fi
# Package removal cleanup
if [ "$1" -eq "0" ] ; then
rm -rf /var/log/ceph
rm -rf /etc/ceph
fi
#################################################################################
@@ -776,10 +771,6 @@ fi
%post -n librbd1
/sbin/ldconfig
# First, cleanup
rm -f /usr/lib64/qemu/librbd.so.1
rmdir /usr/lib64/qemu 2>/dev/null || true
rmdir /usr/lib64/ 2>/dev/null || true
# If x86_64 and rhel6+, link the library to /usr/lib64/qemu -- rhel hack
%ifarch x86_64
%if 0%{?rhel} >= 6
@@ -853,8 +844,7 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
%{_bindir}/ceph_smalliobenchdumb
%{_bindir}/ceph_smalliobenchfs
%{_bindir}/ceph_smalliobenchrbd
%{_bindir}/ceph_filestore_dump
%{_bindir}/ceph_filestore_tool
%{_bindir}/ceph-objectstore-tool
%{_bindir}/ceph_streamtest
%{_bindir}/ceph_test_*
%{_bindir}/ceph_tpbench
@@ -883,6 +873,24 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
%files -n python-ceph-compat
%changelog
* Wed Jul 22 2015 Boris Ranto <branto@redhat.com> - 1:0.80.10-1
- Rebase to 0.80.10
- Remove hacky 3rd patch, it was back-ported properly to .10
* Wed Mar 11 2015 Boris Ranto <branto@redhat.com> - 1:0.80.9-1
- Rebase to 0.80.9, .8 contained a regression
* Wed Mar 4 2015 Boris Ranto <branto@redhat.com> - 1:0.80.8-2
- Perform a hardened build
- Use git-formatted patches
- Do not remove conf files on uninstall
- Remove the cleanup post-script function
* Mon Feb 23 2015 Boris Ranto <branto@redhat.com> - 1:0.80.8-1
- Rebase to 0.80.8 release
- Require yasm, the yasm-related selinux issue was fixed in .8 release
- Patch 3 and 4 are now part of the release
* Wed Jan 14 2015 Boris Ranto <branto@redhat.com> - 1:0.80.7-3
- Fix rhbz#1155335 -- /usr/bin/ceph hangs indefinitely
+1 -1
View File
@@ -1 +1 @@
dc7e46b5804fd5fdb8796416b914c4be ceph-0.80.7.tar.bz2
0bb1d511f39d648035c412c41fd5b8a5 ceph-0.80.10.tar.bz2