]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks: logger.warn() -> logger.warning()
authorMichael Fritch <mfritch@suse.com>
Wed, 13 May 2020 23:16:17 +0000 (17:16 -0600)
committerKefu Chai <kchai@redhat.com>
Sun, 14 Jun 2020 08:34:51 +0000 (16:34 +0800)
logger.warn() is the same as logger.warning(), but was removed in py3.3

Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 44bcee8d1a637b1429a0c9576397f70f0a660ec2)

qa/tasks/cephfs/cephfs_test_case.py
qa/tasks/cephfs/filesystem.py
qa/tasks/cephfs/fuse_mount.py
qa/tasks/cephfs/mount.py
qa/tasks/cephfs/test_full.py
qa/tasks/kclient.py
qa/tasks/thrashosds.py
qa/tasks/vstart_runner.py

index d9464dd4135aa24389a5e0530515e89eb40f5123..fb0483a190d2f7587d914ca8f5cafa3b39c65350 100644 (file)
@@ -252,7 +252,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
index 7352f12c801be6806a7636e9747e64b39a596259..e3b71fe7b31a1eaaeb304e5ba06f069052925e51 100644 (file)
@@ -160,7 +160,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):
index 6ca08a460b816350f78acc85636f29668bb4a170..6b70135098da4bc2e6906b27d855bebbd619b4f9 100644 (file)
@@ -36,7 +36,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
 
@@ -199,7 +199,7 @@ class FuseMount(CephFSMount):
             if ("endpoint is not connected" in proc.stderr.getvalue()
             or "Software caused connection abort" in proc.stderr.getvalue()):
                 # 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
index aeed4fa2043466c7d743332caafc13ed405a3ad8..7a22d05538f7bda71c8688ab1a9ef2fa78e12dd6 100644 (file)
@@ -724,7 +724,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),
index 3ba05af1db7cce0260606abfb3788617313f4135..85b5ac200255f9957988a04549d220d115b41804 100644 (file)
@@ -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(
index 88f27366a718f348ed509a53a0521090cd960fde..2a3d17807344a08384f12bf7f1a01a5e22218769 100644 (file)
@@ -109,7 +109,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)
 
index 221b02513d0d2267fba0cec59564d56918d03a59..aa7ec437a60015702253dbaa9ed094dd03b9eb67 100644 (file)
@@ -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
index df7005e9911abcc23824800b0abb597162bbe12f..c11ab353841059cb8161770fddea4a5f918c6974 100644 (file)
@@ -800,7 +800,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())
@@ -1322,7 +1322,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
@@ -1386,7 +1386,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)
@@ -1452,11 +1452,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