]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/cephadm: fetch final ceph.conf
authorSage Weil <sage@redhat.com>
Fri, 27 Mar 2020 15:42:47 +0000 (10:42 -0500)
committerSage Weil <sage@redhat.com>
Fri, 27 Mar 2020 16:49:29 +0000 (11:49 -0500)
Otherwise we'll distribute the initial ceph.conf, which only has the
bootstrap mon in it.

Signed-off-by: Sage Weil <sage@redhat.com>
qa/tasks/cephadm.py

index afd69911eb878d223eab901bc5f61d542eb945cd..456d22907054d04987c008a66d91802882bfa0ef 100644 (file)
@@ -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