]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ceph.py: use .format to log dicts
authorNathan Cutler <ncutler@suse.com>
Tue, 22 Oct 2019 14:35:27 +0000 (16:35 +0200)
committerNathan Cutler <ncutler@suse.com>
Fri, 27 Mar 2020 23:34:48 +0000 (00:34 +0100)
The ".format" builtin logs dicts nicely right out of the box.

Also, some of the log messages were too cryptic - fixed them in this commit as
well.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit 9abebf28a8c519053bf2e89a944a0b1fdc167ddd)

qa/tasks/ceph.py

index a480e500afd45717f2cf7c2ef176660bd41dcbdc..8db6e8c84ffe95b06260233113dbed6b8fd9e66c 100644 (file)
@@ -600,13 +600,13 @@ def cluster(ctx, config):
         devs = teuthology.get_scratch_devices(remote)
         roles_to_devs = {}
         if config.get('fs'):
-            log.info('fs option selected, checking for scratch devs')
-            log.info('found devs: %s' % (str(devs),))
+            log.info('fs option selected, checking for "scratch" (osd) devs')
+            log.info('found "scratch" (osd) devs: {}'.format(devs))
             roles_to_devs = assign_devs(
                 teuthology.cluster_roles_of_type(roles_for_host, 'osd', cluster_name), devs
             )
             devs_to_clean[remote] = []
-        log.info('dev map: %s' % (str(roles_to_devs),))
+        log.info('osd dev map: {}'.format(roles_to_devs))
         remote_to_roles_to_devs[remote] = roles_to_devs
 
     log.info('Generating config...')
@@ -827,8 +827,8 @@ def cluster(ctx, config):
                     '-p',
                     mnt_point,
                 ])
-            log.info(str(roles_to_devs))
-            log.info(role)
+            log.info('roles_to_devs: {}'.format(roles_to_devs))
+            log.info('role: {}'.format(role))
             if roles_to_devs.get(role):
                 dev = roles_to_devs[role]
                 fs = config.get('fs')