From: Sage Weil Date: Mon, 19 Jan 2015 15:58:39 +0000 (-0800) Subject: ceph: set crush tunables X-Git-Tag: v0.94.10~27^2^2~186^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9e9d7c91ebb2c775ad9f8089637715e25df8a8c5;p=ceph.git ceph: set crush tunables Signed-off-by: Sage Weil --- diff --git a/tasks/ceph.py b/tasks/ceph.py index 0a10822676b0..5fd8e6445633 100644 --- a/tasks/ceph.py +++ b/tasks/ceph.py @@ -145,6 +145,16 @@ def valgrind_post(ctx, config): if valgrind_exception is not None: raise valgrind_exception +@contextlib.contextmanager +def crush_setup(ctx, config): + first_mon = teuthology.get_first_mon(ctx, config) + (mon_remote,) = ctx.cluster.only(first_mon).remotes.iterkeys() + + profile = config.get('crush_tunables', 'default') + log.info('Setting crush tunables to %s', profile) + mon_remote.run( + args=['sudo', 'ceph', 'osd', 'crush', 'tunables', profile]) + yield @contextlib.contextmanager def cephfs_setup(ctx, config): @@ -1231,6 +1241,7 @@ def task(ctx, config): cpu_profile=set(config.get('cpu_profile', [])), )), lambda: run_daemon(ctx=ctx, config=config, type_='mon'), + lambda: crush_setup(ctx=ctx, config=config), lambda: run_daemon(ctx=ctx, config=config, type_='osd'), lambda: cephfs_setup(ctx=ctx, config=config), lambda: run_daemon(ctx=ctx, config=config, type_='mds'),