]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/ceph_client: add cluster param
authorJosh Durgin <jdurgin@redhat.com>
Thu, 17 Mar 2016 02:05:20 +0000 (19:05 -0700)
committerJosh Durgin <jdurgin@redhat.com>
Fri, 20 May 2016 18:08:50 +0000 (11:08 -0700)
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
(cherry picked from commit 466678b980e0527947f5c436d83da6933b216a25)

tasks/ceph_client.py

index d7cfd00be3e4cf7f6f15d0ae8c573ff76252131d..3ca90b7d198813dd9968bb6df1380927093d3a7b 100644 (file)
@@ -8,17 +8,19 @@ from teuthology.orchestra import run
 
 log = logging.getLogger(__name__)
 
-def create_keyring(ctx):
+def create_keyring(ctx, cluster_name):
     """
     Set up key ring on remote sites
     """
     log.info('Setting up client nodes...')
-    clients = ctx.cluster.only(teuthology.is_type('client'))
+    clients = ctx.cluster.only(teuthology.is_type('client', cluster_name))
     testdir = teuthology.get_testdir(ctx)
     coverage_dir = '{tdir}/archive/coverage'.format(tdir=testdir)
     for remote, roles_for_host in clients.remotes.iteritems():
-        for id_ in teuthology.roles_of_type(roles_for_host, 'client'):
-            client_keyring = '/etc/ceph/ceph.client.{id}.keyring'.format(id=id_)
+        for role in teuthology.cluster_roles_of_type(roles_for_host, 'client',
+                                                     cluster_name):
+            name = teuthology.ceph_role(role)
+            client_keyring = '/etc/ceph/{0}.{1}.keyring'.format(cluster_name, name)
             remote.run(
                 args=[
                     'sudo',
@@ -29,7 +31,7 @@ def create_keyring(ctx):
                     '--create-keyring',
                     '--gen-key',
                     # TODO this --name= is not really obeyed, all unknown "types" are munged to "client"
-                    '--name=client.{id}'.format(id=id_),
+                    '--name={name}'.format(name=name),
                     client_keyring,
                     run.Raw('&&'),
                     'sudo',