From: Sage Weil Date: Fri, 27 Mar 2020 15:42:47 +0000 (-0500) Subject: qa/tasks/cephadm: fetch final ceph.conf X-Git-Tag: v15.2.2~80^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4e5616cb08a0e41e9f30e273e6e2103053d36155;p=ceph.git 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 (cherry picked from commit 29d2d7d64b01daed19ba18d971101d756b57ced6) --- diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index 5e2c8685a4c0..61ee8d8a9fee 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