]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/ssh,qa/tasks/ceph2: fix mode to be cephadm-package (vs root)
authorSage Weil <sage@redhat.com>
Wed, 11 Dec 2019 19:52:25 +0000 (13:52 -0600)
committerSage Weil <sage@redhat.com>
Thu, 12 Dec 2019 01:14:09 +0000 (19:14 -0600)
At the same time align the option names with ceph2.py, yay.

Signed-off-by: Sage Weil <sage@redhat.com>
qa/suites/rados/ssh/mode/packaged.yaml
qa/suites/rados/ssh/mode/root.yaml
qa/tasks/ceph2.py
src/pybind/mgr/ssh/module.py

index 35b26857dd4c41655bf5b6d0f23bc58053f42b3f..33e7d7b05c6f42f06198cee293e4e5ead4c530e3 100644 (file)
@@ -1,5 +1,5 @@
 overrides:
   ceph2:
-    ceph_daemon_mode: packaged-ceph-daemon
+    cephadm_mode: cephadm-package
   install:
     extra_packages: [cephadm]
index 061fe8483785e55f32cec3ccb0a1dec76b5ba423..d9ef264d3b7e132658d97ce8a9d1764bebbd74de 100644 (file)
@@ -1,3 +1,3 @@
 overrides:
   ceph2:
-    ceph_daemon_mode: root
+    cephadm_mode: root
index 27b291ca38bf70ff7427e19b1d0f418e77728167..d1134a43109e4a5a3db643d86e3613d248ea4bb0 100644 (file)
@@ -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
index c6d0c283831927fc5f2981ab4aef8d47afbcfad0..bbceb2f05608a601b0b4f751afe70f51d57ba7a4 100644 (file)
@@ -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,