From 5c137e70522f4fd90a006162ca4dd391e219ee2d Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Wed, 9 Jan 2019 14:21:10 -0800 Subject: [PATCH] packaging: split ceph-mgr diskprediction and rook plugins into own packages There are troublesome dependencies for both, so being able to deselect them is useful Signed-off-by: Dan Mick --- ceph.spec.in | 105 +++++++++++++++++- debian/ceph-mgr-diskprediction-cloud.install | 1 + debian/ceph-mgr-diskprediction-cloud.postinst | 43 +++++++ debian/ceph-mgr-diskprediction-cloud.prerm | 8 ++ debian/ceph-mgr-diskprediction-local.install | 1 + debian/ceph-mgr-diskprediction-local.postinst | 43 +++++++ debian/ceph-mgr-diskprediction-local.prerm | 8 ++ debian/ceph-mgr-rook.install | 1 + debian/ceph-mgr-rook.postinst | 43 +++++++ debian/ceph-mgr-rook.prerm | 8 ++ debian/ceph-mgr.install | 28 ++++- debian/control | 48 ++++++++ qa/packages/packages.yaml | 3 + 13 files changed, 338 insertions(+), 2 deletions(-) create mode 100644 debian/ceph-mgr-diskprediction-cloud.install create mode 100644 debian/ceph-mgr-diskprediction-cloud.postinst create mode 100644 debian/ceph-mgr-diskprediction-cloud.prerm create mode 100644 debian/ceph-mgr-diskprediction-local.install create mode 100644 debian/ceph-mgr-diskprediction-local.postinst create mode 100644 debian/ceph-mgr-diskprediction-local.prerm create mode 100644 debian/ceph-mgr-rook.install create mode 100644 debian/ceph-mgr-rook.postinst create mode 100644 debian/ceph-mgr-rook.prerm diff --git a/ceph.spec.in b/ceph.spec.in index 9647878d1db51..92d15499a535d 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -451,6 +451,9 @@ Requires: python%{_python_buildid}-Werkzeug Requires: python%{_python_buildid}-pyOpenSSL Requires: python%{_python_buildid}-bcrypt Recommends: python%{_python_buildid}-influxdb +Recommends: ceph-mgr-diskprediction-local = %{_epoch_prefix}%{version}-%{release} +Recommends: ceph-mgr-diskprediction-cloud = %{_epoch_prefix}%{version}-%{release} +Recommends: ceph-mgr-rook = %{_epoch_prefix}%{version}-%{release} %endif %description mgr ceph-mgr enables python modules that provide services (such as the REST @@ -458,6 +461,41 @@ module derived from Calamari) and expose CLI hooks. ceph-mgr gathers the cluster maps, the daemon metadata, and performance counters, and exposes all these to the python modules. +%package mgr-diskprediction-local +Summary: ceph-mgr diskprediction_local plugin +BuildArch: noarch +%if 0%{?suse_version} +Group: System/Filesystems +%endif +Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} +Requires: numpy +Requires: scipy +%description mgr-diskprediction-local +ceph-mgr-diskprediction-local is a ceph-mgr plugin that tries to predict +disk failures using local algorithms and machine-learning databases. + +%package mgr-diskprediction-cloud +Summary: ceph-mgr diskprediction_cloud plugin +BuildArch: noarch +%if 0%{?suse_version} +Group: System/Filesystems +%endif +Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} +%description mgr-diskprediction-cloud +ceph-mgr-diskprediction-cloud is a ceph-mgr plugin that tries to predict +disk failures using services in the Google cloud. + +%package mgr-rook +Summary: ceph-mgr rook plugin +BuildArch: noarch +%if 0%{?suse_version} +Group: System/Filesystems +%endif +Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} +%description mgr-rook +ceph-mgr-rook is a ceph-mgr plugin for orchestration functions using +a Rook backend. + %package fuse Summary: Ceph fuse-based client %if 0%{?suse_version} @@ -1413,7 +1451,33 @@ fi %files mgr %{_bindir}/ceph-mgr -%{_libdir}/ceph/mgr +%{_libdir}/ceph/mgr/ansible +%{_libdir}/ceph/mgr/balancer +%{_libdir}/ceph/mgr/crash +%{_libdir}/ceph/mgr/dashboard +%{_libdir}/ceph/mgr/deepsea +%{_libdir}/ceph/mgr/devicehealth +%{_libdir}/ceph/mgr/influx +%{_libdir}/ceph/mgr/insights +%{_libdir}/ceph/mgr/iostat +%{_libdir}/ceph/mgr/localpool +%{_libdir}/ceph/mgr/mgr_module.* +%{_libdir}/ceph/mgr/mgr_util.* +%{_libdir}/ceph/mgr/orchestrator_cli +%{_libdir}/ceph/mgr/orchestrator.* +%{_libdir}/ceph/mgr/osd_perf_query +%{_libdir}/ceph/mgr/pg_autoscaler +%{_libdir}/ceph/mgr/progress +%{_libdir}/ceph/mgr/prometheus +%{_libdir}/ceph/mgr/restful +%{_libdir}/ceph/mgr/selftest +%{_libdir}/ceph/mgr/smart +%{_libdir}/ceph/mgr/status +%{_libdir}/ceph/mgr/telegraf +%{_libdir}/ceph/mgr/telemetry +%{_libdir}/ceph/mgr/test_orchestrator +%{_libdir}/ceph/mgr/volumes +%{_libdir}/ceph/mgr/zabbix %{_unitdir}/ceph-mgr@.service %{_unitdir}/ceph-mgr.target %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/mgr @@ -1460,6 +1524,45 @@ if [ $FIRST_ARG -ge 1 ] ; then fi fi +%files mgr-diskprediction-local +%{_libdir}/ceph/mgr/diskprediction_local + +%post mgr-diskprediction-local +if [ $1 -eq 1 ] ; then + /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : +fi + +%postun mgr-diskprediction-local +if [ $1 -eq 1 ] ; then + /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : +fi + +%files mgr-diskprediction-cloud +%{_libdir}/ceph/mgr/diskprediction_cloud + +%post mgr-diskprediction-cloud +if [ $1 -eq 1 ] ; then + /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : +fi + +%postun mgr-diskprediction-cloud +if [ $1 -eq 1 ] ; then + /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : +fi + +%files mgr-rook +%{_libdir}/ceph/mgr/rook + +%post mgr-rook +if [ $1 -eq 1 ] ; then + /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : +fi + +%postun mgr-rook +if [ $1 -eq 1 ] ; then + /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : +fi + %files mon %{_bindir}/ceph-mon %{_bindir}/ceph-monstore-tool diff --git a/debian/ceph-mgr-diskprediction-cloud.install b/debian/ceph-mgr-diskprediction-cloud.install new file mode 100644 index 0000000000000..2d93189128097 --- /dev/null +++ b/debian/ceph-mgr-diskprediction-cloud.install @@ -0,0 +1 @@ +usr/lib/ceph/mgr/diskprediction_cloud diff --git a/debian/ceph-mgr-diskprediction-cloud.postinst b/debian/ceph-mgr-diskprediction-cloud.postinst new file mode 100644 index 0000000000000..d8e7a50ede9e9 --- /dev/null +++ b/debian/ceph-mgr-diskprediction-cloud.postinst @@ -0,0 +1,43 @@ +#!/bin/sh +# vim: set noet ts=8: +# postinst script for ceph-mgr-diskprediction-cloud +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# +# postinst configure +# old-postinst abort-upgrade +# conflictor's-postinst abort-remove in-favour +# postinst abort-remove +# deconfigured's-postinst abort-deconfigure in-favour [ ] +# + +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +case "$1" in + configure) + # attempt to load the plugin if the mgr is running + deb-systemd-invoke try-restart ceph-mgr.target + ;; + abort-upgrade|abort-remove|abort-deconfigure) + : + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/ceph-mgr-diskprediction-cloud.prerm b/debian/ceph-mgr-diskprediction-cloud.prerm new file mode 100644 index 0000000000000..e8e9959b1f32b --- /dev/null +++ b/debian/ceph-mgr-diskprediction-cloud.prerm @@ -0,0 +1,8 @@ +#!/bin/sh +# vim: set noet ts=8: + +set -e + +#DEBHELPER# + +exit 0 diff --git a/debian/ceph-mgr-diskprediction-local.install b/debian/ceph-mgr-diskprediction-local.install new file mode 100644 index 0000000000000..b1efa5f7dd2c8 --- /dev/null +++ b/debian/ceph-mgr-diskprediction-local.install @@ -0,0 +1 @@ +usr/lib/ceph/mgr/diskprediction_local diff --git a/debian/ceph-mgr-diskprediction-local.postinst b/debian/ceph-mgr-diskprediction-local.postinst new file mode 100644 index 0000000000000..a3293a88e2f4c --- /dev/null +++ b/debian/ceph-mgr-diskprediction-local.postinst @@ -0,0 +1,43 @@ +#!/bin/sh +# vim: set noet ts=8: +# postinst script for ceph-mgr-diskprediction-local +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# +# postinst configure +# old-postinst abort-upgrade +# conflictor's-postinst abort-remove in-favour +# postinst abort-remove +# deconfigured's-postinst abort-deconfigure in-favour [ ] +# + +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +case "$1" in + configure) + # attempt to load the plugin if the mgr is running + deb-systemd-invoke try-restart ceph-mgr.target + ;; + abort-upgrade|abort-remove|abort-deconfigure) + : + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/ceph-mgr-diskprediction-local.prerm b/debian/ceph-mgr-diskprediction-local.prerm new file mode 100644 index 0000000000000..e8e9959b1f32b --- /dev/null +++ b/debian/ceph-mgr-diskprediction-local.prerm @@ -0,0 +1,8 @@ +#!/bin/sh +# vim: set noet ts=8: + +set -e + +#DEBHELPER# + +exit 0 diff --git a/debian/ceph-mgr-rook.install b/debian/ceph-mgr-rook.install new file mode 100644 index 0000000000000..36b7d547cb318 --- /dev/null +++ b/debian/ceph-mgr-rook.install @@ -0,0 +1 @@ +usr/lib/ceph/mgr/rook diff --git a/debian/ceph-mgr-rook.postinst b/debian/ceph-mgr-rook.postinst new file mode 100644 index 0000000000000..a3293a88e2f4c --- /dev/null +++ b/debian/ceph-mgr-rook.postinst @@ -0,0 +1,43 @@ +#!/bin/sh +# vim: set noet ts=8: +# postinst script for ceph-mgr-diskprediction-local +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# +# postinst configure +# old-postinst abort-upgrade +# conflictor's-postinst abort-remove in-favour +# postinst abort-remove +# deconfigured's-postinst abort-deconfigure in-favour [ ] +# + +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +case "$1" in + configure) + # attempt to load the plugin if the mgr is running + deb-systemd-invoke try-restart ceph-mgr.target + ;; + abort-upgrade|abort-remove|abort-deconfigure) + : + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/ceph-mgr-rook.prerm b/debian/ceph-mgr-rook.prerm new file mode 100644 index 0000000000000..e8e9959b1f32b --- /dev/null +++ b/debian/ceph-mgr-rook.prerm @@ -0,0 +1,8 @@ +#!/bin/sh +# vim: set noet ts=8: + +set -e + +#DEBHELPER# + +exit 0 diff --git a/debian/ceph-mgr.install b/debian/ceph-mgr.install index 34af599462acb..feac2359a0c18 100644 --- a/debian/ceph-mgr.install +++ b/debian/ceph-mgr.install @@ -1,3 +1,29 @@ lib/systemd/system/ceph-mgr* usr/bin/ceph-mgr -usr/lib/ceph/mgr +usr/lib/ceph/mgr/ansible +usr/lib/ceph/mgr/balancer +usr/lib/ceph/mgr/crash +usr/lib/ceph/mgr/dashboard +usr/lib/ceph/mgr/deepsea +usr/lib/ceph/mgr/devicehealth +usr/lib/ceph/mgr/influx +usr/lib/ceph/mgr/insights +usr/lib/ceph/mgr/iostat +usr/lib/ceph/mgr/localpool +usr/lib/ceph/mgr/mgr_module.* +usr/lib/ceph/mgr/mgr_util.* +usr/lib/ceph/mgr/orchestrator_cli +usr/lib/ceph/mgr/orchestrator.* +usr/lib/ceph/mgr/osd_perf_query +usr/lib/ceph/mgr/pg_autoscaler +usr/lib/ceph/mgr/progress +usr/lib/ceph/mgr/prometheus +usr/lib/ceph/mgr/restful +usr/lib/ceph/mgr/selftest +usr/lib/ceph/mgr/smart +usr/lib/ceph/mgr/status +usr/lib/ceph/mgr/test_orchestrator +usr/lib/ceph/mgr/telegraf +usr/lib/ceph/mgr/telemetry +usr/lib/ceph/mgr/volumes +usr/lib/ceph/mgr/zabbix diff --git a/debian/control b/debian/control index 0b0cceb039156..0912084689b8a 100644 --- a/debian/control +++ b/debian/control @@ -189,6 +189,7 @@ Depends: ceph-base (= ${binary:Version}), ${misc:Depends}, ${python:Depends}, ${shlibs:Depends}, +Recommends: ceph-mgr-diskprediction-local, ceph-mgr-diskprediction-cloud, ceph-mgr-rook Suggests: python-influxdb Replaces: ceph (<< 0.93-417), Breaks: ceph (<< 0.93-417), @@ -200,6 +201,53 @@ Description: manager for the ceph distributed storage system This package contains the manager daemon, which is used to expose high level management and monitoring functionality. +Package: ceph-mgr-diskprediction-local +Architecture: any +Depends: ceph-mgr (= ${binary:Version}), + python-numpy, + python-scipy, + python-sklearn, + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends}, +Description: diskprediction-local plugin for ceph-mgr + Ceph is a massively scalable, open-source, distributed + storage system that runs on commodity hardware and delivers object, + block and file system storage. + . + This package contains the diskprediction_local plugin for the ceph-mgr + daemon, which helps predict disk failures. + +Package: ceph-mgr-diskprediction-cloud +Architecture: any +Depends: ceph-mgr (= ${binary:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends}, +Description: diskprediction-cloud plugin for ceph-mgr + Ceph is a massively scalable, open-source, distributed + storage system that runs on commodity hardware and delivers object, + block and file system storage. + . + This package contains the diskprediction_cloud plugin for the ceph-mgr + daemon, which helps predict disk failures. + +Package: ceph-mgr-rook +Architecture: any +Depends: ceph-mgr (= ${binary:Version}), + python-six, + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends}, +Description: rook plugin for ceph-mgr + Ceph is a massively scalable, open-source, distributed + storage system that runs on commodity hardware and delivers object, + block and file system storage. + . + This package contains the rook plugin for ceph-mgr's orchestration + functionality, to allow ceph-mgr to install and configure ceph using + Rook. + Package: ceph-mgr-dbg Architecture: linux-any Section: debug diff --git a/qa/packages/packages.yaml b/qa/packages/packages.yaml index 2b891af36c381..8432d25008cb6 100644 --- a/qa/packages/packages.yaml +++ b/qa/packages/packages.yaml @@ -37,6 +37,9 @@ ceph: - ceph-test - ceph - ceph-mgr + - ceph-mgr-diskprediction-cloud + - ceph-mgr-diskprediction-local + - ceph-mgr-rook - ceph-fuse - cephfs-java - libcephfs_jni1 -- 2.39.5