From: Nathan Cutler Date: Tue, 22 Oct 2019 14:35:27 +0000 (+0200) Subject: qa/tasks/ceph.py: use .format to log dicts X-Git-Tag: v14.2.10~115^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7ad7b8b05b5791e017694e2e81d3fe72c29d9d50;p=ceph.git qa/tasks/ceph.py: use .format to log dicts 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 (cherry picked from commit 9abebf28a8c519053bf2e89a944a0b1fdc167ddd) --- diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index f5d6c3f6c573..09ca4972bcf7 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -607,13 +607,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...') @@ -834,8 +834,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')