From 524e6d7a5e29ff325edd2673e3774fad757bb83e Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Wed, 23 Mar 2016 16:50:53 -0700 Subject: [PATCH] tasks/ceph_manager: add cluster param to write_conf() Only used by cephfs right now, so don't bother changing callers. Signed-off-by: Josh Durgin --- tasks/ceph.py | 2 +- tasks/ceph_manager.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/ceph.py b/tasks/ceph.py index 595ac3515919b..b10d50f9e6a8d 100644 --- a/tasks/ceph.py +++ b/tasks/ceph.py @@ -489,7 +489,7 @@ def cluster(ctx, config): default_conf_path = '/etc/ceph/{cluster}.conf'.format(cluster=cluster_name) conf_path = config.get('conf_path', default_conf_path) log.info('Writing %s for FSID %s...' % (conf_path, fsid)) - write_conf(ctx, conf_path) + write_conf(ctx, conf_path, cluster_name) log.info('Creating admin key on %s...' % firstmon) ctx.cluster.only(firstmon).run( diff --git a/tasks/ceph_manager.py b/tasks/ceph_manager.py index 1d3a10485aaea..6d1e6295355f6 100644 --- a/tasks/ceph_manager.py +++ b/tasks/ceph_manager.py @@ -27,9 +27,9 @@ DEFAULT_CONF_PATH = '/etc/ceph/ceph.conf' log = logging.getLogger(__name__) -def write_conf(ctx, conf_path=DEFAULT_CONF_PATH): +def write_conf(ctx, conf_path=DEFAULT_CONF_PATH, cluster='ceph'): conf_fp = StringIO() - ctx.ceph.conf.write(conf_fp) + ctx.ceph[cluster].conf.write(conf_fp) conf_fp.seek(0) writes = ctx.cluster.run( args=[ -- 2.39.5