From 120ad0de01b35ff87d151582d7b38e86c55033c7 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Jan 14 2015 19:19:41 +0000 Subject: Merge branch 'f21' into epel7 Conflicts: ceph.spec sources --- diff --git a/ceph-call-rados-shutdown-explicitly.patch b/ceph-call-rados-shutdown-explicitly.patch new file mode 100644 index 0000000..e1338c9 --- /dev/null +++ b/ceph-call-rados-shutdown-explicitly.patch @@ -0,0 +1,31 @@ +From 11995b329045341c17553269267cfd3688a51b0f Mon Sep 17 00:00:00 2001 +From: Dan Mick +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 +(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 + diff --git a/ceph-common-do-not-unlock-rwlock-on-destruction.patch b/ceph-common-do-not-unlock-rwlock-on-destruction.patch new file mode 100644 index 0000000..b6ba221 --- /dev/null +++ b/ceph-common-do-not-unlock-rwlock-on-destruction.patch @@ -0,0 +1,27 @@ +From 922247e25bfb64bdbe43dd8133881aaf405b8a0b Mon Sep 17 00:00:00 2001 +From: Boris Ranto +Date: Mon, 8 Dec 2014 08:36:37 +0100 +Subject: [PATCH] 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 +--- a/src/common/RWLock.h ++++ b/src/common/RWLock.h +@@ -36,7 +36,9 @@ public: + } + + virtual ~RWLock() { +- pthread_rwlock_unlock(&L); ++ // The following check is racy but we are about to destroy ++ // the object and we assume that there are no other users. ++ //assert(!is_locked()); -- hacky backport, no is_locked in firefly + pthread_rwlock_destroy(&L); + } + +-- +2.1.3 + diff --git a/ceph-remove-rados-py-destructor.patch b/ceph-remove-rados-py-destructor.patch new file mode 100644 index 0000000..4faac44 --- /dev/null +++ b/ceph-remove-rados-py-destructor.patch @@ -0,0 +1,61 @@ +From e00270b51896f168d5013b7dc92ec7f8b9e19da3 Mon Sep 17 00:00:00 2001 +From: Dan Mick +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 +(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 + diff --git a/ceph.spec b/ceph.spec index 8439aa7..9c7bf9c 100644 --- a/ceph.spec +++ b/ceph.spec @@ -9,24 +9,31 @@ # common ################################################################################# Name: ceph -Version: 0.80.5 -Release: 10%{?dist} +Version: 0.80.7 +Release: 3%{?dist} Epoch: 1 Summary: User space components of the Ceph file system -License: GPL-2.0 +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 Requires: librbd1 = %{epoch}:%{version}-%{release} Requires: librados2 = %{epoch}:%{version}-%{release} Requires: libcephfs1 = %{epoch}:%{version}-%{release} Requires: ceph-common = %{epoch}:%{version}-%{release} +Requires: python-rados = %{epoch}:%{version}-%{release} +Requires: python-rbd = %{epoch}:%{version}-%{release} +Requires: python-cephfs = %{epoch}:%{version}-%{release} Requires: python Requires: python-argparse -Requires: python-ceph Requires: python-requests +# For ceph-rest-api +Requires: python-flask %if ! ( 0%{?rhel} && 0%{?rhel} <= 6 ) Requires: xfsprogs %endif @@ -116,7 +123,9 @@ Summary: Ceph Common Group: System Environment/Base Requires: librbd1 = %{epoch}:%{version}-%{release} Requires: librados2 = %{epoch}:%{version}-%{release} -Requires: python-ceph = %{epoch}:%{version}-%{release} +Requires: python-rados = %{epoch}:%{version}-%{release} +Requires: python-rbd = %{epoch}:%{version}-%{release} +Requires: python-cephfs = %{epoch}:%{version}-%{release} Requires: python-requests Requires: redhat-lsb-core %description -n ceph-common @@ -140,19 +149,6 @@ BuildRequires: fuse-devel %description -n rbd-fuse FUSE based client to map Ceph rbd images to files -%package devel -Summary: Ceph headers -Group: Development/Libraries -License: LGPL-2.0 -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: librados2 = %{epoch}:%{version}-%{release} -Requires: librbd1 = %{epoch}:%{version}-%{release} -Requires: libcephfs1 = %{epoch}:%{version}-%{release} -Requires: libcephfs_jni1 = %{epoch}:%{version}-%{release} -%description devel -This package contains libraries and headers needed to develop programs -that use Ceph. - %package radosgw Summary: Rados REST gateway Group: Development/Libraries @@ -197,6 +193,26 @@ developed as part of the Ceph distributed storage system. This is a shared library allowing applications to access the distributed object store using a simple file-like interface. +%package -n librados2-devel +Summary: RADOS headers +Group: Development/Libraries +License: LGPL-2.0 +Requires: librados2 = %{epoch}:%{version}-%{release} +Obsoletes: ceph-devel +%description -n librados2-devel +This package contains libraries and headers needed to develop programs +that use RADOS object store. + +%package -n python-rados +Summary: Python libraries for the RADOS object store +Group: System Environment/Libraries +License: LGPL-2.0 +Requires: librados2 = %{epoch}:%{version}-%{release} +Obsoletes: python-ceph +%description -n python-rados +This package contains Python libraries for interacting with Cephs RADOS +object store. + %package -n librbd1 Summary: RADOS block device client library Group: System Environment/Libraries @@ -211,6 +227,28 @@ RADOS, a reliable, autonomic distributed object storage cluster developed as part of the Ceph distributed storage system. This is a shared library allowing applications to manage these block devices. +%package -n librbd1-devel +Summary: RADOS block device headers +Group: Development/Libraries +License: LGPL-2.0 +Requires: librbd1 = %{epoch}:%{version}-%{release} +Requires: librados2-devel = %{epoch}:%{version}-%{release} +Obsoletes: ceph-devel +%description -n librbd1-devel +This package contains libraries and headers needed to develop programs +that use RADOS block device. + +%package -n python-rbd +Summary: Python libraries for the RADOS block device +Group: System Environment/Libraries +License: LGPL-2.0 +Requires: librbd1 = %{epoch}:%{version}-%{release} +Requires: python-rados = %{epoch}:%{version}-%{release} +Obsoletes: python-ceph +%description -n python-rbd +This package contains Python libraries for interacting with Cephs RADOS +block device. + %package -n libcephfs1 Summary: Ceph distributed file system client library Group: System Environment/Libraries @@ -225,19 +263,27 @@ performance, reliability, and scalability. This is a shared library allowing applications to access a Ceph distributed file system via a POSIX-like interface. -%package -n python-ceph -Summary: Python libraries for the Ceph distributed filesystem +%package -n libcephfs1-devel +Summary: Ceph distributed file system headers +Group: Development/Libraries +License: LGPL-2.0 +Requires: libcephfs1 = %{epoch}:%{version}-%{release} +Requires: librados2-devel = %{epoch}:%{version}-%{release} +Obsoletes: ceph-devel +%description -n libcephfs1-devel +This package contains libraries and headers needed to develop programs +that use Cephs distributed file system. + +%package -n python-cephfs +Summary: Python libraries for Ceph distributed file system Group: System Environment/Libraries License: LGPL-2.0 -Requires: librados2 = %{epoch}:%{version}-%{release} -Requires: librbd1 = %{epoch}:%{version}-%{release} -Requires: python-flask -%if 0%{defined suse_version} -%py_requires -%endif -%description -n python-ceph -This package contains Python libraries for interacting with Cephs RADOS -object storage. +Requires: libcephfs1 = %{epoch}:%{version}-%{release} +Requires: python-rados = %{epoch}:%{version}-%{release} +Obsoletes: python-ceph +%description -n python-cephfs +This package contains Python libraries for interacting with Cephs distributed +file system. %package -n rest-bench Summary: RESTful benchmark @@ -268,6 +314,16 @@ BuildRequires: java-devel This package contains the Java Native Interface library for CephFS Java bindings. +%package -n libcephfs_jni1-devel +Summary: Development files for CephFS Java Native Interface library. +Group: System Environment/Libraries +License: LGPL-2.0 +Requires: java +Requires: libcephfs_jni1 = %{epoch}:%{version}-%{release} +%description -n libcephfs_jni1-devel +This package contains the development files for CephFS Java Native Interface +library. + %package -n cephfs-java Summary: Java libraries for the Ceph File System. Group: System Environment/Libraries @@ -282,12 +338,11 @@ This package contains the Java libraries for the Ceph File System. Summary: Meta package to include ceph libraries. Group: System Environment/Libraries License: LGPL-2.0 -Obsoletes: ceph-libs < 1:0.80.5 +Obsoletes: ceph-libs Requires: librados2 = %{epoch}:%{version}-%{release} Requires: librbd1 = %{epoch}:%{version}-%{release} Requires: libcephfs1 = %{epoch}:%{version}-%{release} Provides: ceph-libs - %description libs-compat This is a meta package, that pulls in librados2, librbd1 and libcephfs1. It is included for backwards compatibility with distributions that depend on the @@ -295,6 +350,38 @@ former ceph-libs package, which is now split up into these three subpackages. Packages still depending on ceph-libs should be fixed to depend on librados2, librbd1 or libcephfs1 instead. +%package devel-compat +Summary: Compatibility package for Ceph headers +Group: Development/Libraries +License: LGPL-2.0 +Obsoletes: ceph-devel +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: librados2-devel = %{epoch}:%{version}-%{release} +Requires: librbd1-devel = %{epoch}:%{version}-%{release} +Requires: libcephfs1-devel = %{epoch}:%{version}-%{release} +Requires: libcephfs_jni1-devel = %{epoch}:%{version}-%{release} +Provides: ceph-devel +%description devel-compat +This is a compatibility package to accommodate ceph-devel split into +librados2-devel, librbd1-devel and libcephfs1-devel. Packages still depending +on ceph-devel should be fixed to depend on librados2-devel, librbd1-devel +or libcephfs1-devel instead. + +%package -n python-ceph-compat +Summary: Compatibility package for Cephs python libraries +Group: System Environment/Libraries +License: LGPL-2.0 +Obsoletes: python-ceph +Requires: python-rados = %{epoch}:%{version}-%{release} +Requires: python-rbd = %{epoch}:%{version}-%{release} +Requires: python-cephfs = %{epoch}:%{version}-%{release} +Provides: python-ceph +%description -n python-ceph-compat +This is a compatibility package to accommodate python-ceph split into +python-rados, python-rbd and python-cephfs. Packages still depending on +python-ceph should be fixed to depend on python-rados, python-rbd or +python-cephfs instead. + %if 0%{?opensuse} || 0%{?suse_version} %debug_package %endif @@ -306,6 +393,9 @@ librbd1 or libcephfs1 instead. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build # Find jni.h @@ -458,6 +548,7 @@ fi %{_bindir}/cephfs %{_bindir}/ceph-clsinfo %{_bindir}/ceph-rest-api +%{python_sitelib}/ceph_rest_api.py* %{_bindir}/crushtool %{_bindir}/monmaptool %{_bindir}/osdmaptool @@ -572,6 +663,7 @@ fi %config %{_sysconfdir}/bash_completion.d/rbd %config(noreplace) %{_sysconfdir}/ceph/rbdmap %{_initrddir}/rbdmap +%{python_sitelib}/ceph_argparse.py* %postun -n ceph-common # Package removal cleanup @@ -598,29 +690,6 @@ fi %{_mandir}/man8/rbd-fuse.8* ################################################################################# -%files devel -%defattr(-,root,root,-) -%dir %{_includedir}/cephfs -%{_includedir}/cephfs/libcephfs.h -%dir %{_includedir}/rados -%{_includedir}/rados/librados.h -%{_includedir}/rados/librados.hpp -%{_includedir}/rados/buffer.h -%{_includedir}/rados/page.h -%{_includedir}/rados/crc32c.h -%{_includedir}/rados/rados_types.h -%{_includedir}/rados/rados_types.hpp -%{_includedir}/rados/memory.h -%dir %{_includedir}/rbd -%{_includedir}/rbd/librbd.h -%{_includedir}/rbd/librbd.hpp -%{_includedir}/rbd/features.h -%{_libdir}/libcephfs.so -%{_libdir}/librbd.so -%{_libdir}/librados.so -%{_libdir}/libcephfs_jni.so - -################################################################################# %files radosgw %defattr(-,root,root,-) %{_initrddir}/ceph-radosgw @@ -677,6 +746,25 @@ fi /sbin/ldconfig ################################################################################# +%files -n librados2-devel +%defattr(-,root,root,-) +%dir %{_includedir}/rados +%{_includedir}/rados/librados.h +%{_includedir}/rados/librados.hpp +%{_includedir}/rados/buffer.h +%{_includedir}/rados/page.h +%{_includedir}/rados/crc32c.h +%{_includedir}/rados/rados_types.h +%{_includedir}/rados/rados_types.hpp +%{_includedir}/rados/memory.h +%{_libdir}/librados.so + +################################################################################# +%files -n python-rados +%defattr(-,root,root,-) +%{python_sitelib}/rados.py* + +################################################################################# %files -n librbd1 %defattr(-,root,root,-) %{_libdir}/librbd.so.* @@ -704,6 +792,20 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1 /sbin/ldconfig ################################################################################# +%files -n librbd1-devel +%defattr(-,root,root,-) +%dir %{_includedir}/rbd +%{_includedir}/rbd/librbd.h +%{_includedir}/rbd/librbd.hpp +%{_includedir}/rbd/features.h +%{_libdir}/librbd.so + +################################################################################# +%files -n python-rbd +%defattr(-,root,root,-) +%{python_sitelib}/rbd.py* + +################################################################################# %files -n libcephfs1 %defattr(-,root,root,-) %{_libdir}/libcephfs.so.* @@ -715,13 +817,16 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1 /sbin/ldconfig ################################################################################# -%files -n python-ceph +%files -n libcephfs1-devel +%defattr(-,root,root,-) +%dir %{_includedir}/cephfs +%{_includedir}/cephfs/libcephfs.h +%{_libdir}/libcephfs.so + +################################################################################# +%files -n python-cephfs %defattr(-,root,root,-) -%{python_sitelib}/rados.py* -%{python_sitelib}/rbd.py* %{python_sitelib}/cephfs.py* -%{python_sitelib}/ceph_argparse.py* -%{python_sitelib}/ceph_rest_api.py* ################################################################################# %files -n rest-bench @@ -762,13 +867,41 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1 %defattr(-,root,root,-) %{_libdir}/libcephfs_jni.so.* +%files -n libcephfs_jni1-devel +%defattr(-,root,root,-) +%{_libdir}/libcephfs_jni.so + %files -n cephfs-java %defattr(-,root,root,-) %{_javadir}/libcephfs.jar +# We need to create these three for compatibility reasons %files libs-compat +%files devel-compat + +%files -n python-ceph-compat + %changelog +* Wed Jan 14 2015 Boris Ranto - 1:0.80.7-3 +- Fix rhbz#1155335 -- /usr/bin/ceph hangs indefinitely + +* Mon Dec 8 2014 Boris Ranto - 1:0.80.7-2 +- Fix rhbz#1144794 + +* Thu Oct 16 2014 Boris Ranto - 1:0.80.7-1 +- Rebase to latest upstream version + +* Sat Oct 11 2014 Boris Ranto - 1:0.80.6-3 +- Fix a typo in librados-devel vs librados2-devel dependency + +* Fri Oct 10 2014 Boris Ranto - 1:0.80.6-2 +- Provide empty file list for python-ceph-compat and ceph-devel-compat + +* Fri Oct 10 2014 Boris Ranto - 1:0.80.6-1 +- Rebase to 0.80.6 +- Split ceph-devel and python-ceph packages + * Tue Sep 9 2014 Dan Horák - 1:0.80.5-10 - update Requires for s390(x) diff --git a/sources b/sources index ae72eff..993ebd6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c57f6887f6097f95ad2c3b169a94f811 ceph-0.80.5.tar.bz2 +dc7e46b5804fd5fdb8796416b914c4be ceph-0.80.7.tar.bz2