From: Sage Weil Date: Wed, 11 Dec 2019 19:52:25 +0000 (-0600) Subject: mgr/ssh,qa/tasks/ceph2: fix mode to be cephadm-package (vs root) X-Git-Tag: v15.1.0~544^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7d63071d4e3db38c3c7d84fa18b53e1feaa39838;p=ceph.git mgr/ssh,qa/tasks/ceph2: fix mode to be cephadm-package (vs root) At the same time align the option names with ceph2.py, yay. Signed-off-by: Sage Weil --- diff --git a/qa/suites/rados/ssh/mode/packaged.yaml b/qa/suites/rados/ssh/mode/packaged.yaml index 35b26857dd4c..33e7d7b05c6f 100644 --- a/qa/suites/rados/ssh/mode/packaged.yaml +++ b/qa/suites/rados/ssh/mode/packaged.yaml @@ -1,5 +1,5 @@ overrides: ceph2: - ceph_daemon_mode: packaged-ceph-daemon + cephadm_mode: cephadm-package install: extra_packages: [cephadm] diff --git a/qa/suites/rados/ssh/mode/root.yaml b/qa/suites/rados/ssh/mode/root.yaml index 061fe8483785..d9ef264d3b7e 100644 --- a/qa/suites/rados/ssh/mode/root.yaml +++ b/qa/suites/rados/ssh/mode/root.yaml @@ -1,3 +1,3 @@ overrides: ceph2: - ceph_daemon_mode: root + cephadm_mode: root diff --git a/qa/tasks/ceph2.py b/qa/tasks/ceph2.py index 27b291ca38bf..d1134a43109e 100644 --- a/qa/tasks/ceph2.py +++ b/qa/tasks/ceph2.py @@ -95,8 +95,8 @@ def download_ceph_daemon(ctx, config, ref): cluster_name = config['cluster'] testdir = teuthology.get_testdir(ctx) - if config.get('ceph_daemon_mode') != 'packaged-ceph-daemon': - ref = config.get('ceph_daemon_branch', ref) + if config.get('cephadm_mode') != 'cephadm-package': + ref = config.get('cephadm_branch', ref) git_url = teuth_config.get_ceph_git_url() log.info('Downloading cephadm (repo %s ref %s)...' % (git_url, ref)) ctx.cluster.run( @@ -130,7 +130,7 @@ def download_ceph_daemon(ctx, config, ref): '--force', ]) - if config.get('ceph_daemon_mode') == 'root': + if config.get('cephadm_mode') == 'root': log.info('Removing cephadm ...') ctx.cluster.run( args=[ @@ -779,11 +779,11 @@ def task(ctx, config): cluster_name = config['cluster'] ctx.ceph[cluster_name] = argparse.Namespace() - # ceph-daemon mode? - if 'ceph_daemon_mode' not in config: - config['ceph_daemon_mode'] = 'root' - assert config['ceph_daemon_mode'] in ['root', 'packaged-ceph-daemon'] - if config['ceph_daemon_mode'] == 'root': + # cephadm mode? + if 'cephadm_mode' not in config: + config['cephadm_mode'] = 'root' + assert config['cephadm_mode'] in ['root', 'cephadm-package'] + if config['cephadm_mode'] == 'root': ctx.ceph_daemon = testdir + '/cephadm' else: ctx.ceph_daemon = 'cephadm' # in the path diff --git a/src/pybind/mgr/ssh/module.py b/src/pybind/mgr/ssh/module.py index c6d0c2838319..bbceb2f05608 100644 --- a/src/pybind/mgr/ssh/module.py +++ b/src/pybind/mgr/ssh/module.py @@ -258,9 +258,9 @@ class SSHOrchestrator(MgrModule, orchestrator.Orchestrator): { 'name': 'mode', 'type': 'str', - 'enum_allowed': ['root', 'ceph-daemon-package'], + 'enum_allowed': ['root', 'cephadm-package'], 'default': 'root', - 'desc': 'mode for remote execution of ceph-daemon', + 'desc': 'mode for remote execution of cephadm', }, { 'name': 'container_image_base', @@ -417,7 +417,7 @@ class SSHOrchestrator(MgrModule, orchestrator.Orchestrator): if self.mode == 'root': self.ssh_user = 'root' - elif self.mode == 'ceph-daemon-package': + elif self.mode == 'cephadm-package': self.ssh_user = 'cephadm' @staticmethod @@ -630,7 +630,7 @@ class SSHOrchestrator(MgrModule, orchestrator.Orchestrator): conn, ['/usr/bin/python', '-u'], stdin=script.encode('utf-8')) - elif self.mode == 'ceph-daemon-package': + elif self.mode == 'cephadm-package': out, err, code = remoto.process.check( conn, ['sudo', '/usr/bin/cephadm'] + final_args,