]> git.apps.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>
Wed, 3 Jun 2020 11:57:00 +0000 (19:57 +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)

Conflicts:
qa/tasks/vstart_runner.py: trivial resolution

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 83c0f62acb274dbfb0acbc8d2f9de4b0b3d80344..f376bb69aac1c5c4135228fbaafce95a3d192916 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 9ca7d10a268da3d741f72dfe54149d7f9679e4a9..d8d4d0821d2c979bffbc998fc8196e4775aefe1d 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))
 
 class CephCluster(object):
index d496a8f7aefccaeba89e728b9f1c485d0eef61f8..68fc387d7aa56087ddb46528d5e73f8adde9f56c 100644 (file)
@@ -37,7 +37,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
 
@@ -198,7 +198,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 a1d10b9d3a01f7593dfce4abfcd2407420799852..e56010b4aa521d230176496aa8080d9aad2ea2a7 100644 (file)
@@ -679,7 +679,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 d20325ed25092c23ea57a243092713f61da9ddba..e0311883ecae071d429fef9ff7ad4e49ee288b08 100644 (file)
@@ -209,7 +209,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 50d557f3ce75523b8bf368e2fbb8fbf83eb68ac5..ce0d73f56bfb4850078c146871e3e8b68001cfa7 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 7b17b5d861d96313f64915a235a20d8e532c7709..253663f89aa84c4e14cd3a7edd5e7d1df7d04374 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 0e0183778678e794f290e2ea92ea2f7b3d5dd157..f0e43156ebe87a0c00c54b3503c4249692940d21 100644 (file)
@@ -495,7 +495,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())
@@ -932,7 +932,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
@@ -991,7 +991,7 @@ def exec_test():
         mount = LocalFuseMount(ctx, test_dir, client_id)
         mounts.append(mount)
         if mount.is_mounted():
-            log.warn("unmounting {0}".format(mount.mountpoint))
+            log.warning("unmounting {0}".format(mount.mountpoint))
             mount.umount_wait()
         else:
             if os.path.exists(mount.mountpoint):
@@ -1058,11 +1058,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: ".format(method.id()))
+            log.warning("Dropping test because long running: ".format(method.id()))
 
         if getattr(fn, "needs_trimming", False) is True:
             drop_test = (os.getuid() != 0)
-            log.warn("Dropping test because client trim unavailable: ".format(method.id()))
+            log.warning("Dropping test because client trim unavailable: ".format(method.id()))
 
         if drop_test:
             # Don't drop the test if it was explicitly requested in arguments