From 3eefd5c524cd21590e5037b3b7b3ee20e8450e9d Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 12 Feb 2019 17:05:30 +0800 Subject: [PATCH 1/3] debian: split ceph-mgr-dashboard plugin into its own package to make ceph-mgr-dashboard a separated package - helps to reduce the repo size of downstream. because ceph-mgr-dashboard is an architecture independent package. by making it separated package avoids needless duplication of the same data in mutiple .debs. - gives user a fine grained control of selection. Signed-off-by: Kefu Chai --- debian/ceph-mgr-dashboard.install | 1 + debian/ceph-mgr-dashboard.postinst | 43 ++++++++++++++++++++++++++++++ debian/ceph-mgr-dashboard.prerm | 8 ++++++ debian/ceph-mgr.install | 1 - debian/control | 28 ++++++++++++++++++- 5 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 debian/ceph-mgr-dashboard.install create mode 100644 debian/ceph-mgr-dashboard.postinst create mode 100644 debian/ceph-mgr-dashboard.prerm diff --git a/debian/ceph-mgr-dashboard.install b/debian/ceph-mgr-dashboard.install new file mode 100644 index 00000000000..618dcbddaa8 --- /dev/null +++ b/debian/ceph-mgr-dashboard.install @@ -0,0 +1 @@ +usr/lib/ceph/mgr/dashboard diff --git a/debian/ceph-mgr-dashboard.postinst b/debian/ceph-mgr-dashboard.postinst new file mode 100644 index 00000000000..e681ef6b62f --- /dev/null +++ b/debian/ceph-mgr-dashboard.postinst @@ -0,0 +1,43 @@ +#!/bin/sh +# vim: set noet ts=8: +# postinst script for ceph-mgr-dashboard +# +# 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-dashboard.prerm b/debian/ceph-mgr-dashboard.prerm new file mode 100644 index 00000000000..e8e9959b1f3 --- /dev/null +++ b/debian/ceph-mgr-dashboard.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 c134b8eb8c6..587dcefc6c3 100644 --- a/debian/ceph-mgr.install +++ b/debian/ceph-mgr.install @@ -3,7 +3,6 @@ usr/bin/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 diff --git a/debian/control b/debian/control index 05861a89183..ddc3f8e55fa 100644 --- a/debian/control +++ b/debian/control @@ -187,7 +187,10 @@ Depends: ceph-base (= ${binary:Version}), ${misc:Depends}, ${python:Depends}, ${shlibs:Depends}, -Recommends: ceph-mgr-diskprediction-local, ceph-mgr-diskprediction-cloud, ceph-mgr-rook +Recommends: ceph-mgr-dashboard, + ceph-mgr-diskprediction-local, + ceph-mgr-diskprediction-cloud, + ceph-mgr-rook Suggests: python-influxdb Replaces: ceph (<< 0.93-417), Breaks: ceph (<< 0.93-417), @@ -199,6 +202,29 @@ 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-dashboard +Architecture: all +Depends: ceph-mgr (= ${binary:Version}), + python-cherrypy3, + python-jwt, + python-openssl, + python-bcrypt, + python-werkzeug, + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends}, +Description: dashboard 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 provides a ceph-mgr plugin, providing a web-based + application to monitor and manage many aspects of a Ceph cluster and + related components. + . + See the Dashboard documentation at http://docs.ceph.com/ for details + and a detailed feature overview. + Package: ceph-mgr-diskprediction-local Architecture: all Depends: ceph-mgr (= ${binary:Version}), From 937025b4f3c952a151a0b2c86731f7812c14afa2 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 12 Feb 2019 17:13:12 +0800 Subject: [PATCH 2/3] rpm: split ceph-mgr-dashboard plugin into its own package to make ceph-mgr-dashboard a separated package - helps to reduce the repo size of downstream. because ceph-mgr-dashboard is an architecture independent package. by making it separated package avoids needless duplication of the same data in mutiple .debs. - gives user a fine grained control of selection. Signed-off-by: Kefu Chai --- ceph.spec.in | 51 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/ceph.spec.in b/ceph.spec.in index 0d81ecbae86..36e13c5ec17 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -431,20 +431,13 @@ Requires: python%{_python_buildid}-pecan Requires: python%{_python_buildid}-six %if 0%{?fedora} || 0%{?rhel} Requires: python%{_python_buildid}-cherrypy -Requires: python%{_python_buildid}-jwt -Requires: python%{_python_buildid}-routes Requires: python%{_python_buildid}-werkzeug -Requires: pyOpenSSL%{_python_buildid} -Requires: python%{_python_buildid}-bcrypt %endif %if 0%{?suse_version} Requires: python%{_python_buildid}-CherryPy -Requires: python%{_python_buildid}-PyJWT -Requires: python%{_python_buildid}-Routes Requires: python%{_python_buildid}-Werkzeug -Requires: python%{_python_buildid}-pyOpenSSL -Requires: python%{_python_buildid}-bcrypt Recommends: python%{_python_buildid}-influxdb +Recommends: ceph-mgr-dashboard = %{_epoch_prefix}%{version}-%{release} 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} @@ -455,6 +448,34 @@ 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-dashboard +Summary: Ceph Dashboard +%if 0%{?suse_version} +Group: System/Filesystems +%endif +Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release} +%if 0%{?fedora} || 0%{?rhel} +Requires: python%{_python_buildid}-cherrypy +Requires: python%{_python_buildid}-jwt +Requires: python%{_python_buildid}-routes +Requires: python%{_python_buildid}-werkzeug +Requires: pyOpenSSL%{_python_buildid} +Requires: python%{_python_buildid}-bcrypt +%endif +%if 0%{?suse_version} +Requires: python%{_python_buildid}-CherryPy +Requires: python%{_python_buildid}-PyJWT +Requires: python%{_python_buildid}-Routes +Requires: python%{_python_buildid}-Werkzeug +Requires: python%{_python_buildid}-pyOpenSSL +Requires: python%{_python_buildid}-bcrypt +%endif +%description mgr-dashboard +ceph-mgr-dashboard is a manager plugin, providing a web-based application +to monitor and manage many aspects of a Ceph cluster and related components. +See the Dashboard documentation at http://docs.ceph.com/ for details and a +detailed feature overview. + %package mgr-diskprediction-local Summary: ceph-mgr diskprediction_local plugin BuildArch: noarch @@ -1443,7 +1464,6 @@ fi %{_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 @@ -1514,6 +1534,19 @@ if [ $FIRST_ARG -ge 1 ] ; then fi fi +%files mgr-dashboard +%{_libdir}/ceph/mgr/dashboard + +%post mgr-dashboard +if [ $1 -eq 1 ] ; then + /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : +fi + +%postun mgr-dashboard +if [ $1 -eq 1 ] ; then + /usr/bin/systemctl try-restart ceph-mgr.target >/dev/null 2>&1 || : +fi + %files mgr-diskprediction-local %{_libdir}/ceph/mgr/diskprediction_local From 3d128d040e0c2f5ef71a636dd6556f1f5956b71a Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 12 Feb 2019 17:14:19 +0800 Subject: [PATCH 3/3] qa: exclude new packages when installing old versions ceph-mgr-dashboard is introduced in nautilus, so exclude it when installing old versions. Signed-off-by: Kefu Chai --- qa/packages/packages.yaml | 1 + .../upgrade/featureful_client/old_client/tasks/0-luminous.yaml | 1 + .../featureful_client/upgraded_client/tasks/0-luminous.yaml | 1 + qa/suites/fs/upgrade/snaps/tasks/0-luminous.yaml | 1 + qa/suites/rados/thrash-old-clients/1-install/hammer.yaml | 1 + qa/suites/rados/thrash-old-clients/1-install/jewel.yaml | 1 + qa/suites/rados/thrash-old-clients/1-install/luminous.yaml | 1 + .../rados/upgrade/luminous-x-singleton/1-install/luminous.yaml | 1 + .../upgrade/luminous-x/parallel/1-ceph-install/luminous.yaml | 1 + .../upgrade/luminous-x/stress-split/1-ceph-install/luminous.yaml | 1 + qa/suites/upgrade/mimic-x/parallel/1-ceph-install/mimic.yaml | 1 + qa/suites/upgrade/mimic-x/stress-split/1-ceph-install/mimic.yaml | 1 + 12 files changed, 12 insertions(+) diff --git a/qa/packages/packages.yaml b/qa/packages/packages.yaml index 8432d25008c..c2019ac8271 100644 --- a/qa/packages/packages.yaml +++ b/qa/packages/packages.yaml @@ -37,6 +37,7 @@ ceph: - ceph-test - ceph - ceph-mgr + - ceph-mgr-dashboard - ceph-mgr-diskprediction-cloud - ceph-mgr-diskprediction-local - ceph-mgr-rook diff --git a/qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-luminous.yaml b/qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-luminous.yaml index 629af5a78d0..1a364a4da19 100644 --- a/qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-luminous.yaml +++ b/qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-luminous.yaml @@ -6,6 +6,7 @@ tasks: branch: luminous exclude_packages: - librados3 + - ceph-mgr-dashboard - ceph-mgr-diskprediction-local - ceph-mgr-diskprediction-cloud - ceph-mgr-rook diff --git a/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-luminous.yaml b/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-luminous.yaml index 629af5a78d0..1a364a4da19 100644 --- a/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-luminous.yaml +++ b/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-luminous.yaml @@ -6,6 +6,7 @@ tasks: branch: luminous exclude_packages: - librados3 + - ceph-mgr-dashboard - ceph-mgr-diskprediction-local - ceph-mgr-diskprediction-cloud - ceph-mgr-rook diff --git a/qa/suites/fs/upgrade/snaps/tasks/0-luminous.yaml b/qa/suites/fs/upgrade/snaps/tasks/0-luminous.yaml index 629af5a78d0..1a364a4da19 100644 --- a/qa/suites/fs/upgrade/snaps/tasks/0-luminous.yaml +++ b/qa/suites/fs/upgrade/snaps/tasks/0-luminous.yaml @@ -6,6 +6,7 @@ tasks: branch: luminous exclude_packages: - librados3 + - ceph-mgr-dashboard - ceph-mgr-diskprediction-local - ceph-mgr-diskprediction-cloud - ceph-mgr-rook diff --git a/qa/suites/rados/thrash-old-clients/1-install/hammer.yaml b/qa/suites/rados/thrash-old-clients/1-install/hammer.yaml index 60093ca85f0..bf7c5ee7b42 100644 --- a/qa/suites/rados/thrash-old-clients/1-install/hammer.yaml +++ b/qa/suites/rados/thrash-old-clients/1-install/hammer.yaml @@ -12,6 +12,7 @@ tasks: downgrade_packages: ['librbd1', 'librados2'] exclude_packages: - librados3 + - ceph-mgr-dashboard - ceph-mgr-diskprediction-local - ceph-mgr-diskprediction-cloud - ceph-mgr-rook diff --git a/qa/suites/rados/thrash-old-clients/1-install/jewel.yaml b/qa/suites/rados/thrash-old-clients/1-install/jewel.yaml index c38d57af40d..d64c206109c 100644 --- a/qa/suites/rados/thrash-old-clients/1-install/jewel.yaml +++ b/qa/suites/rados/thrash-old-clients/1-install/jewel.yaml @@ -3,6 +3,7 @@ tasks: branch: jewel exclude_packages: - librados3 + - ceph-mgr-dashboard - ceph-mgr-diskprediction-local - ceph-mgr-diskprediction-cloud - ceph-mgr-rook diff --git a/qa/suites/rados/thrash-old-clients/1-install/luminous.yaml b/qa/suites/rados/thrash-old-clients/1-install/luminous.yaml index 5849e990ba6..c72e59e222c 100644 --- a/qa/suites/rados/thrash-old-clients/1-install/luminous.yaml +++ b/qa/suites/rados/thrash-old-clients/1-install/luminous.yaml @@ -3,6 +3,7 @@ tasks: branch: luminous exclude_packages: - librados3 + - ceph-mgr-dashboard - ceph-mgr-diskprediction-local - ceph-mgr-diskprediction-cloud - ceph-mgr-rook diff --git a/qa/suites/rados/upgrade/luminous-x-singleton/1-install/luminous.yaml b/qa/suites/rados/upgrade/luminous-x-singleton/1-install/luminous.yaml index 878263803db..8f23280c806 100644 --- a/qa/suites/rados/upgrade/luminous-x-singleton/1-install/luminous.yaml +++ b/qa/suites/rados/upgrade/luminous-x-singleton/1-install/luminous.yaml @@ -10,6 +10,7 @@ tasks: branch: luminous exclude_packages: - librados3 + - ceph-mgr-dashboard - ceph-mgr-diskprediction-local - ceph-mgr-diskprediction-cloud - ceph-mgr-rook diff --git a/qa/suites/upgrade/luminous-x/parallel/1-ceph-install/luminous.yaml b/qa/suites/upgrade/luminous-x/parallel/1-ceph-install/luminous.yaml index 3672828b743..a0b8270d973 100644 --- a/qa/suites/upgrade/luminous-x/parallel/1-ceph-install/luminous.yaml +++ b/qa/suites/upgrade/luminous-x/parallel/1-ceph-install/luminous.yaml @@ -8,6 +8,7 @@ tasks: branch: luminous exclude_packages: - librados3 + - ceph-mgr-dashboard - ceph-mgr-diskprediction-local - ceph-mgr-diskprediction-cloud - ceph-mgr-rook diff --git a/qa/suites/upgrade/luminous-x/stress-split/1-ceph-install/luminous.yaml b/qa/suites/upgrade/luminous-x/stress-split/1-ceph-install/luminous.yaml index 982862f4675..cfdc0426368 100644 --- a/qa/suites/upgrade/luminous-x/stress-split/1-ceph-install/luminous.yaml +++ b/qa/suites/upgrade/luminous-x/stress-split/1-ceph-install/luminous.yaml @@ -5,6 +5,7 @@ tasks: branch: luminous exclude_packages: - librados3 + - ceph-mgr-dashboard - ceph-mgr-diskprediction-local - ceph-mgr-diskprediction-cloud - ceph-mgr-rook diff --git a/qa/suites/upgrade/mimic-x/parallel/1-ceph-install/mimic.yaml b/qa/suites/upgrade/mimic-x/parallel/1-ceph-install/mimic.yaml index 5f420b099b2..3d978dbb7c7 100644 --- a/qa/suites/upgrade/mimic-x/parallel/1-ceph-install/mimic.yaml +++ b/qa/suites/upgrade/mimic-x/parallel/1-ceph-install/mimic.yaml @@ -8,6 +8,7 @@ tasks: branch: mimic exclude_packages: - librados3 + - ceph-mgr-dashboard - ceph-mgr-diskprediction-local - ceph-mgr-diskprediction-cloud - ceph-mgr-rook diff --git a/qa/suites/upgrade/mimic-x/stress-split/1-ceph-install/mimic.yaml b/qa/suites/upgrade/mimic-x/stress-split/1-ceph-install/mimic.yaml index 0a50078b237..c6598b64b34 100644 --- a/qa/suites/upgrade/mimic-x/stress-split/1-ceph-install/mimic.yaml +++ b/qa/suites/upgrade/mimic-x/stress-split/1-ceph-install/mimic.yaml @@ -5,6 +5,7 @@ tasks: branch: mimic exclude_packages: - librados3 + - ceph-mgr-dashboard - ceph-mgr-diskprediction-local - ceph-mgr-diskprediction-cloud - ceph-mgr-rook