From: John Spray Date: Mon, 8 Sep 2014 10:34:07 +0000 (+0100) Subject: tasks: rename FuseMount.get_client_id to get_global_id X-Git-Tag: v0.94.10~27^2^2~282^2~6^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3e07bd1aaa6938ce8b7a8e3847e1a5d21f890aff;p=ceph.git tasks: rename FuseMount.get_client_id to get_global_id 'client_id' was ambiguous because in other places it meant the '0' in client.0, whereas here it means the runtime-generated global ID of the client. Signed-off-by: John Spray --- diff --git a/tasks/cephfs/fuse_mount.py b/tasks/cephfs/fuse_mount.py index 37ef0789dfe7..2c4f886c3083 100644 --- a/tasks/cephfs/fuse_mount.py +++ b/tasks/cephfs/fuse_mount.py @@ -223,10 +223,7 @@ class FuseMount(CephFSMount): ], ) - # FIXME: bad naming scheme to call this client_id and also have the - # 'client_id' attr which is something completely different. This - # is what a MonSession calls global_id. - def get_client_id(self): + def get_global_id(self): """ Look up the CephFS client ID for this mount """ diff --git a/tasks/mds_client_limits.py b/tasks/mds_client_limits.py index a4a25ccc826b..8ea8849f170e 100644 --- a/tasks/mds_client_limits.py +++ b/tasks/mds_client_limits.py @@ -131,7 +131,7 @@ class TestClientLimits(CephFSTestCase): self.fs.set_ceph_conf('mds', 'mds cache size', cache_size) self.fs.mds_restart() - mount_a_client_id = self.mount_a.get_client_id() + mount_a_client_id = self.mount_a.get_global_id() path = "subdir/mount_a" if use_subdir else "mount_a" open_proc = self.mount_a.open_n_background(path, open_files) @@ -184,7 +184,7 @@ class TestClientLimits(CephFSTestCase): self.mount_a.teardown() self.mount_a.mount() self.mount_a.wait_until_mounted() - mount_a_client_id = self.mount_a.get_client_id() + mount_a_client_id = self.mount_a.get_global_id() # Client A creates a file. He will hold the write caps on the file, and later (simulated bug) fail # to comply with the MDSs request to release that cap diff --git a/tasks/mds_client_recovery.py b/tasks/mds_client_recovery.py index 7e3d28c99d5b..bb8fe8231484 100644 --- a/tasks/mds_client_recovery.py +++ b/tasks/mds_client_recovery.py @@ -68,7 +68,7 @@ class TestClientRecovery(CephFSTestCase): self.assertSetEqual( set([l['id'] for l in ls_data]), - {self.mount_a.get_client_id(), self.mount_b.get_client_id()} + {self.mount_a.get_global_id(), self.mount_b.get_global_id()} ) def test_restart(self): @@ -91,7 +91,7 @@ class TestClientRecovery(CephFSTestCase): self.fs.mds_stop() self.fs.mds_fail() - mount_a_client_id = self.mount_a.get_client_id() + mount_a_client_id = self.mount_a.get_global_id() self.mount_a.umount_wait(force=True) self.fs.mds_restart() @@ -130,7 +130,7 @@ class TestClientRecovery(CephFSTestCase): self.fs.mds_stop() self.fs.mds_fail() - mount_a_client_id = self.mount_a.get_client_id() + mount_a_client_id = self.mount_a.get_global_id() self.mount_a.umount_wait(force=True) self.fs.mds_restart() @@ -208,7 +208,7 @@ class TestClientRecovery(CephFSTestCase): # Take out a write capability on a file on client A, # and then immediately kill it. cap_holder = self.mount_a.open_background() - mount_a_client_id = self.mount_a.get_client_id() + mount_a_client_id = self.mount_a.get_global_id() # Wait for the file to be visible from another client, indicating # that mount_a has completed its network ops @@ -263,7 +263,7 @@ class TestClientRecovery(CephFSTestCase): self.mount_b.umount_wait() # Initially our one client session should be visible - client_id = self.mount_a.get_client_id() + client_id = self.mount_a.get_global_id() ls_data = self._session_list() self.assert_session_count(1, ls_data) self.assertEqual(ls_data[0]['id'], client_id)