From: Sage Weil Date: Fri, 10 Mar 2017 21:48:35 +0000 (-0500) Subject: install: install ceph-mgr X-Git-Tag: v1.5.38~5^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=473907dc0d9f553abb1e386f4d95c3f2bb01642e;p=ceph-deploy.git install: install ceph-mgr Do this implicitly by installing the 'ceph' metapackage. This way we can still install older versions (e.g., jewel) that lack ceph-mgr without any problems. Signed-off-by: Sage Weil --- diff --git a/ceph_deploy/install.py b/ceph_deploy/install.py index 34fc762..f7b19ed 100644 --- a/ceph_deploy/install.py +++ b/ceph_deploy/install.py @@ -36,6 +36,7 @@ def detect_components(args, distro): * ceph * ceph-mon + * ceph-mgr * ceph-osd * ceph-mds @@ -55,6 +56,7 @@ def detect_components(args, distro): 'install_rgw': 'ceph-radosgw', 'install_mds': 'ceph-mds', 'install_mon': 'ceph-mon', + 'install_mgr': 'ceph-mgr', 'install_common': 'ceph-common', 'install_tests': 'ceph-test', } @@ -492,6 +494,13 @@ def make(parser): help='install the mon component only', ) + parser.add_argument( + '--mgr', + dest='install_mgr', + action='store_true', + help='install the mgr component only', + ) + parser.add_argument( '--mds', dest='install_mds', diff --git a/ceph_deploy/tests/test_install.py b/ceph_deploy/tests/test_install.py index a8bd326..2d62bac 100644 --- a/ceph_deploy/tests/test_install.py +++ b/ceph_deploy/tests/test_install.py @@ -45,6 +45,7 @@ class TestDetectComponents(object): # default values for install_* flags self.args.install_all = False self.args.install_mds = False + self.args.install_mgr = False self.args.install_mon = False self.args.install_osd = False self.args.install_rgw = False @@ -64,7 +65,7 @@ class TestDetectComponents(object): self.distro.is_deb = True result = sorted(install.detect_components(self.args, self.distro)) assert result == sorted([ - 'ceph-osd', 'ceph-mds', 'ceph-mon', 'radosgw' + 'ceph-osd', 'ceph-mds', 'ceph-mgr', 'ceph-mon', 'radosgw' ]) def test_install_all_with_other_options_returns_all_packages_deb(self): @@ -72,28 +73,30 @@ class TestDetectComponents(object): self.distro.is_deb = True self.args.install_all = True self.args.install_mds = True + self.args.install_mgr = True self.args.install_mon = True self.args.install_osd = True result = sorted(install.detect_components(self.args, self.distro)) assert result == sorted([ - 'ceph-osd', 'ceph-mds', 'ceph-mon', 'radosgw' + 'ceph-osd', 'ceph-mds', 'ceph-mgr', 'ceph-mon', 'radosgw' ]) def test_install_all_returns_all_packages_rpm(self): self.args.install_all = True result = sorted(install.detect_components(self.args, self.distro)) assert result == sorted([ - 'ceph-osd', 'ceph-mds', 'ceph-mon', 'ceph-radosgw' + 'ceph-osd', 'ceph-mds', 'ceph-mgr', 'ceph-mon', 'ceph-radosgw' ]) def test_install_all_with_other_options_returns_all_packages_rpm(self): self.args.install_all = True self.args.install_mds = True self.args.install_mon = True + self.args.install_mgr = True self.args.install_osd = True result = sorted(install.detect_components(self.args, self.distro)) assert result == sorted([ - 'ceph-osd', 'ceph-mds', 'ceph-mon', 'ceph-radosgw' + 'ceph-osd', 'ceph-mds', 'ceph-mgr', 'ceph-mon', 'ceph-radosgw' ]) def test_install_only_one_component(self): @@ -104,8 +107,9 @@ class TestDetectComponents(object): def test_install_a_couple_of_components(self): self.args.install_osd = True self.args.install_mds = True + self.args.install_mgr = True result = sorted(install.detect_components(self.args, self.distro)) - assert result == sorted(['ceph-osd', 'ceph-mds']) + assert result == sorted(['ceph-osd', 'ceph-mds', 'ceph-mgr']) def test_install_tests(self): self.args.install_tests = True @@ -115,5 +119,5 @@ class TestDetectComponents(object): def test_install_all_should_be_default_when_no_options_passed(self): result = sorted(install.detect_components(self.args, self.distro)) assert result == sorted([ - 'ceph-osd', 'ceph-mds', 'ceph-mon', 'ceph-radosgw' + 'ceph-osd', 'ceph-mds', 'ceph-mgr', 'ceph-mon', 'ceph-radosgw' ]) diff --git a/ceph_deploy/util/constants.py b/ceph_deploy/util/constants.py index 74833b7..65775d9 100644 --- a/ceph_deploy/util/constants.py +++ b/ceph_deploy/util/constants.py @@ -11,12 +11,15 @@ tmp_path = join(base_path, 'tmp') mon_path = join(base_path, 'mon') +mgr_path = join(base_path, 'mgr') + mds_path = join(base_path, 'mds') osd_path = join(base_path, 'osd') # Default package components to install _base_components = [ + 'ceph', 'ceph-osd', 'ceph-mds', 'ceph-mon',