mirror of
https://github.com/ceph/ceph
synced 2025-01-02 17:12:31 +00:00
qa/tasks/cephadm: support crush_tunables config option
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
f996db6a14
commit
eba385b715
@ -825,6 +825,18 @@ def distribute_config_and_admin_keyring(ctx, config):
|
||||
'/etc/ceph/{}.client.admin.keyring'.format(cluster_name),
|
||||
])
|
||||
|
||||
@contextlib.contextmanager
|
||||
def crush_setup(ctx, config):
|
||||
cluster_name = config['cluster']
|
||||
first_mon = teuthology.get_first_mon(ctx, config, cluster_name)
|
||||
(mon_remote,) = ctx.cluster.only(first_mon).remotes.keys()
|
||||
|
||||
profile = config.get('crush_tunables', 'default')
|
||||
log.info('Setting crush tunables to %s', profile)
|
||||
_shell(ctx, cluster_name, ctx.ceph[cluster_name].bootstrap_remote,
|
||||
args=['ceph', 'osd', 'crush', 'tunables', profile])
|
||||
yield
|
||||
|
||||
@contextlib.contextmanager
|
||||
def task(ctx, config):
|
||||
if config is None:
|
||||
@ -908,6 +920,7 @@ def task(ctx, config):
|
||||
lambda: ceph_log(ctx=ctx, config=config),
|
||||
lambda: ceph_crash(ctx=ctx, config=config),
|
||||
lambda: ceph_bootstrap(ctx=ctx, config=config),
|
||||
lambda: crush_setup(ctx=ctx, config=config),
|
||||
lambda: ceph_mons(ctx=ctx, config=config),
|
||||
lambda: ceph_mgrs(ctx=ctx, config=config),
|
||||
lambda: ceph_osds(ctx=ctx, config=config),
|
||||
|
Loading…
Reference in New Issue
Block a user