mirror of
https://github.com/ceph/ceph
synced 2025-03-05 07:48:55 +00:00
tasks/thrashosds: add an option to specify the cluster to thrash
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>
This commit is contained in:
parent
0acbafe371
commit
b88d595571
@ -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
|
||||
|
||||
@ -112,6 +114,7 @@ def task(ctx, config):
|
||||
tasks:
|
||||
- ceph:
|
||||
- thrashosds:
|
||||
cluster: ceph
|
||||
chance_down: 10
|
||||
op_delay: 3
|
||||
min_in: 1
|
||||
@ -132,6 +135,7 @@ def task(ctx, config):
|
||||
config['noscrub_toggle_delay'] = config.get('noscrub_toggle_delay', 2.0)
|
||||
overrides = ctx.config.get('overrides', {})
|
||||
teuthology.deep_merge(config, overrides.get('thrashosds', {}))
|
||||
cluster = config.get('cluster', 'ceph')
|
||||
|
||||
if 'powercycle' in config:
|
||||
|
||||
@ -171,7 +175,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(
|
||||
|
Loading…
Reference in New Issue
Block a user