]> 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)
committerSebastian Wagner <sebastian.wagner@suse.com>
Tue, 7 Apr 2020 09:36:27 +0000 (11:36 +0200)
Otherwise we'll distribute the initial ceph.conf, which only has the
bootstrap mon in it.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 29d2d7d64b01daed19ba18d971101d756b57ced6)

qa/tasks/cephadm.py

index 5e2c8685a4c032996140669c5729e85a62411ce1..61ee8d8a9feecbdecf84f6bdc3f968c11dc6c5e5 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