From 29d2d7d64b01daed19ba18d971101d756b57ced6 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 27 Mar 2020 10:42:47 -0500 Subject: [PATCH] qa/tasks/cephadm: fetch final ceph.conf Otherwise we'll distribute the initial ceph.conf, which only has the bootstrap mon in it. Signed-off-by: Sage Weil --- qa/tasks/cephadm.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index afd69911eb878..456d22907054d 100644 --- a/qa/tasks/cephadm.py +++ b/qa/tasks/cephadm.py @@ -421,7 +421,7 @@ def ceph_bootstrap(ctx, config): for remote in ctx.cluster.remotes.keys(): if remote == bootstrap_remote: continue - log.info('Writing conf and keyring to %s' % remote.shortname) + log.info('Writing (initial) conf and keyring to %s' % remote.shortname) teuthology.write_file( remote=remote, path='/etc/ceph/{}.conf'.format(cluster_name), @@ -516,6 +516,19 @@ def ceph_mons(ctx, config): if len(j['mons']) == num_mons: break + # refresh our (final) ceph.conf file + log.info('Generating final ceph.conf file...') + r = _shell( + ctx=ctx, + cluster_name=cluster_name, + remote=remote, + args=[ + 'ceph', 'config', 'generate-minimal-conf', + ], + stdout=BytesIO(), + ) + ctx.ceph[cluster_name].config_file = r.stdout.getvalue() + # refresh ceph.conf files for all mons + first mgr for remote, roles in ctx.cluster.remotes.items(): for mon in [r for r in roles -- 2.39.5