]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/tasks: logger.warn() -> logger.warning()
authorMichael Fritch <mfritch@suse.com>
Wed, 13 May 2020 23:16:17 +0000 (17:16 -0600)
committerMichael Fritch <mfritch@suse.com>
Wed, 13 May 2020 23:18:13 +0000 (17:18 -0600)
logger.warn() is the same as logger.warning(), but was removed in py3.3

Signed-off-by: Michael Fritch <mfritch@suse.com>
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 a035c2301bf66f599536c709a1b4faf8115a735d..1105e35d49a7185dd1ec044c1ccfb310d52bfc77 100644 (file)
@@ -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
index 2847b57da77608e8ffac7f95394314e20951833f..6454116b6b15d49e96a04bc607302943c74a5824 100644 (file)
@@ -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):
index f46689b5b06f4fda8a46d74e4a1a5a857aade70f..d00fa39671b96f6975645553529522cbbebc0615 100644 (file)
@@ -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
index 2cd34e22533890aa407a1d5627791caa3cbd8a4a..a2bdbdf1c8bb18c53fc584e0f540be8555da684b 100644 (file)
@@ -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),
index 8dc9a478818bee7e87a19eb3fd71b58d62c2dd94..eaa36c7c9d62fbc9384c357a850e7587e254cdb3 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 efc6cb47ff28f1608af0e0c82509b6aeeb6bade1..a6271a220c3f90f5251ff148335aa79faffe4a72 100644 (file)
@@ -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)
 
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 6ceeff47a252348f9fc83733795625db40487fba..9f9f60657b22a50aa6022da7a85842702647edf6 100644 (file)
@@ -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