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: v15.2.1~17^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=63e0db3f007a7c2c470a98f9d4514a1d08fca40f;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 a480e500afd4..8db6e8c84ffe 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -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')