From: Xiubo Li Date: Fri, 3 Apr 2020 23:10:57 +0000 (-0400) Subject: qa/tasks/cephfs: rename mounted() to mounted_wait() X-Git-Tag: v16.1.0~2551^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=06d10798d76bd06062415628fa421e61bc11cef4;p=ceph.git qa/tasks/cephfs: rename mounted() to mounted_wait() The boolean self.mounted parameter is conflicted with mounted() helper, so we will hit error like: INFO:tasks.cephfs_test_runner:TypeError: 'bool' object is not callable Fixes: https://tracker.ceph.com/issues/44044 Signed-off-by: Xiubo Li --- diff --git a/qa/tasks/cephfs/mount.py b/qa/tasks/cephfs/mount.py index dfea9cf154f3..9e9c2b1c5567 100644 --- a/qa/tasks/cephfs/mount.py +++ b/qa/tasks/cephfs/mount.py @@ -491,7 +491,7 @@ class CephFSMount(object): return "/etc/ceph/ceph.conf" @contextmanager - def mounted(self): + def mounted_wait(self): """ A context manager, from an initially unmounted state, to mount this, yield, and then unmount and clean up. diff --git a/qa/tasks/cephfs/test_journal_migration.py b/qa/tasks/cephfs/test_journal_migration.py index 8863b371f396..67b514c22f1c 100644 --- a/qa/tasks/cephfs/test_journal_migration.py +++ b/qa/tasks/cephfs/test_journal_migration.py @@ -32,7 +32,7 @@ class TestJournalMigration(CephFSTestCase): self.assertTrue(self.fs.get_replay(status=status) is not None) # Do some client work so that the log is populated with something. - with self.mount_a.mounted(): + with self.mount_a.mounted_wait(): self.mount_a.create_files() self.mount_a.check_files() # sanity, this should always pass @@ -56,7 +56,7 @@ class TestJournalMigration(CephFSTestCase): # Check that files created in the initial client workload are still visible # in a client mount. - with self.mount_a.mounted(): + with self.mount_a.mounted_wait(): self.mount_a.check_files() # Verify that the journal really has been rewritten. @@ -86,7 +86,7 @@ class TestJournalMigration(CephFSTestCase): raise RuntimeError("Unexpectedly few journal events: {0}".format(event_count)) # Do some client work to check that writing the log is still working - with self.mount_a.mounted(): + with self.mount_a.mounted_wait(): workunit(self.ctx, { 'clients': { "client.{0}".format(self.mount_a.client_id): ["fs/misc/trivial_sync.sh"],