]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/thrashosds: add an option to specify the cluster to thrash
authorJosh Durgin <jdurgin@redhat.com>
Wed, 23 Mar 2016 20:05:15 +0000 (13:05 -0700)
committerJosh Durgin <jdurgin@redhat.com>
Fri, 20 May 2016 18:08:52 +0000 (11:08 -0700)
Thrashing must be aware of the cluster it is using, since it maintains
some invariants (e.g. enough osds up when waiting to recover).

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
(cherry picked from commit b88d595571f4415b17e50afa4dc47cbe6ae87bc4)

tasks/thrashosds.py

index cf0a65759fa515f62e67ac75432a08c3631d5e39..1b29c6d67b9337a70175171e46c654272143c634 100644 (file)
@@ -22,6 +22,8 @@ def task(ctx, config):
 
     The config is optional, and is a dict containing some or all of:
 
+    cluster: (default 'ceph') the name of the cluster to thrash
+
     min_in: (default 3) the minimum number of OSDs to keep in the
        cluster
 
@@ -105,6 +107,7 @@ def task(ctx, config):
     tasks:
     - ceph:
     - thrashosds:
+        cluster: ceph
         chance_down: 10
         op_delay: 3
         min_in: 1
@@ -119,6 +122,7 @@ def task(ctx, config):
     config['sighup_delay'] = config.get('sighup_delay', 0.1)
     overrides = ctx.config.get('overrides', {})
     teuthology.deep_merge(config, overrides.get('thrashosds', {}))
+    cluster = config.get('cluster', 'ceph')
 
     if 'powercycle' in config:
 
@@ -158,7 +162,7 @@ def task(ctx, config):
                     log.debug('console ready on %s' % cname)
 
             # check that all osd remotes have a valid console
-            osds = ctx.cluster.only(teuthology.is_type('osd'))
+            osds = ctx.cluster.only(teuthology.is_type('osd', cluster))
             for remote, _ in osds.remotes.iteritems():
                 if not remote.console:
                     raise Exception(