From 44bcee8d1a637b1429a0c9576397f70f0a660ec2 Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Wed, 13 May 2020 17:16:17 -0600 Subject: [PATCH] qa/tasks: logger.warn() -> logger.warning() logger.warn() is the same as logger.warning(), but was removed in py3.3 Signed-off-by: Michael Fritch --- qa/tasks/cephfs/cephfs_test_case.py | 2 +- qa/tasks/cephfs/filesystem.py | 2 +- qa/tasks/cephfs/fuse_mount.py | 4 ++-- qa/tasks/cephfs/mount.py | 2 +- qa/tasks/cephfs/test_full.py | 2 +- qa/tasks/kclient.py | 2 +- qa/tasks/thrashosds.py | 2 +- qa/tasks/vstart_runner.py | 10 +++++----- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/qa/tasks/cephfs/cephfs_test_case.py b/qa/tasks/cephfs/cephfs_test_case.py index a035c2301bf..1105e35d49a 100644 --- a/qa/tasks/cephfs/cephfs_test_case.py +++ b/qa/tasks/cephfs/cephfs_test_case.py @@ -250,7 +250,7 @@ class CephFSTestCase(CephTestCase): timeout=30 ) except RuntimeError: - log.warn("Timeout waiting for daemons {0}, while we have {1}".format( + log.warning("Timeout waiting for daemons {0}, while we have {1}".format( daemon_ids, get_daemon_names() )) raise diff --git a/qa/tasks/cephfs/filesystem.py b/qa/tasks/cephfs/filesystem.py index 2847b57da77..6454116b6b1 100644 --- a/qa/tasks/cephfs/filesystem.py +++ b/qa/tasks/cephfs/filesystem.py @@ -163,7 +163,7 @@ class FSStatus(object): if info: return info['addr'] else: - log.warn(json.dumps(list(self.get_all()), indent=2)) # dump for debugging + log.warning(json.dumps(list(self.get_all()), indent=2)) # dump for debugging raise RuntimeError("MDS id '{0}' not found in map".format(name)) def get_mds_gid(self, gid): diff --git a/qa/tasks/cephfs/fuse_mount.py b/qa/tasks/cephfs/fuse_mount.py index f46689b5b06..d00fa39671b 100644 --- a/qa/tasks/cephfs/fuse_mount.py +++ b/qa/tasks/cephfs/fuse_mount.py @@ -40,7 +40,7 @@ class FuseMount(CephFSMount): # failures) and ensure the mount is not left half-up. # Otherwise we might leave a zombie mount point that causes # anyone traversing cephtest/ to get hung up on. - log.warn("Trying to clean up after failed mount") + log.warning("Trying to clean up after failed mount") self.umount_wait(force=True) raise @@ -207,7 +207,7 @@ class FuseMount(CephFSMount): if ("endpoint is not connected" in error or "Software caused connection abort" in error): # This happens is fuse is killed without unmount - log.warn("Found stale moutn point at {0}".format(self.mountpoint)) + log.warning("Found stale moutn point at {0}".format(self.mountpoint)) return True else: # This happens if the mount directory doesn't exist diff --git a/qa/tasks/cephfs/mount.py b/qa/tasks/cephfs/mount.py index 2cd34e22533..a2bdbdf1c8b 100644 --- a/qa/tasks/cephfs/mount.py +++ b/qa/tasks/cephfs/mount.py @@ -1134,7 +1134,7 @@ class CephFSMount(object): p = self.run_shell(["df", "-B1", "."]) lines = p.stdout.getvalue().strip().split("\n") fs, total, used, avail = lines[1].split()[:4] - log.warn(lines) + log.warning(lines) return { "total": int(total), diff --git a/qa/tasks/cephfs/test_full.py b/qa/tasks/cephfs/test_full.py index 8dc9a478818..eaa36c7c9d6 100644 --- a/qa/tasks/cephfs/test_full.py +++ b/qa/tasks/cephfs/test_full.py @@ -212,7 +212,7 @@ class FullnessTestCase(CephFSTestCase): # Configs for this test should bring this setting down in order to # run reasonably quickly if osd_mon_report_interval > 10: - log.warn("This test may run rather slowly unless you decrease" + log.warning("This test may run rather slowly unless you decrease" "osd_mon_report_interval (5 is a good setting)!") self.mount_a.run_python(template.format( diff --git a/qa/tasks/kclient.py b/qa/tasks/kclient.py index efc6cb47ff2..a6271a220c3 100644 --- a/qa/tasks/kclient.py +++ b/qa/tasks/kclient.py @@ -111,7 +111,7 @@ def task(ctx, config): try: mount.umount() except (CommandFailedError, MaxWhileTries): - log.warn("Ordinary umount failed, forcing...") + log.warning("Ordinary umount failed, forcing...") forced = True mount.umount_wait(force=True) diff --git a/qa/tasks/thrashosds.py b/qa/tasks/thrashosds.py index 221b02513d0..aa7ec437a60 100644 --- a/qa/tasks/thrashosds.py +++ b/qa/tasks/thrashosds.py @@ -176,7 +176,7 @@ def task(ctx, config): for remote in ctx.cluster.remotes.keys(): log.debug('checking console status of %s' % remote.shortname) if not remote.console.check_status(): - log.warn('Failed to get console status for %s', + log.warning('Failed to get console status for %s', remote.shortname) # check that all osd remotes have a valid console diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index 6ceeff47a25..9f9f60657b2 100644 --- a/qa/tasks/vstart_runner.py +++ b/qa/tasks/vstart_runner.py @@ -711,7 +711,7 @@ class LocalFuseMount(FuseMount): check_status=False ) if p.exitstatus != 0: - log.warn("ls conns failed with {0}, assuming none".format(p.exitstatus)) + log.warning("ls conns failed with {0}, assuming none".format(p.exitstatus)) return [] ls_str = six.ensure_str(p.stdout.getvalue().strip()) @@ -1249,7 +1249,7 @@ def exec_test(): for line in lines: if 'ceph-fuse' in line or 'ceph-mds' in line: pid = int(line.split()[0]) - log.warn("Killing stray process {0}".format(line)) + log.warning("Killing stray process {0}".format(line)) os.kill(pid, signal.SIGKILL) # Fire up the Ceph cluster if the user requested it @@ -1313,7 +1313,7 @@ def exec_test(): mounts.append(mount) if os.path.exists(mount.mountpoint): if mount.is_mounted(): - log.warn("unmounting {0}".format(mount.mountpoint)) + log.warning("unmounting {0}".format(mount.mountpoint)) mount.umount_wait() else: os.rmdir(mount.mountpoint) @@ -1379,11 +1379,11 @@ def exec_test(): if hasattr(fn, 'is_for_teuthology') and getattr(fn, 'is_for_teuthology') is True: drop_test = True - log.warn("Dropping test because long running: {method_id}".format(method_id=method.id())) + log.warning("Dropping test because long running: {method_id}".format(method_id=method.id())) if getattr(fn, "needs_trimming", False) is True: drop_test = (os.getuid() != 0) - log.warn("Dropping test because client trim unavailable: {method_id}".format(method_id=method.id())) + log.warning("Dropping test because client trim unavailable: {method_id}".format(method_id=method.id())) if drop_test: # Don't drop the test if it was explicitly requested in arguments -- 2.39.5