]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks: rename FuseMount.get_client_id to get_global_id
authorJohn Spray <jspray@redhat.com>
Mon, 8 Sep 2014 10:34:07 +0000 (11:34 +0100)
committerJohn Spray <jspray@redhat.com>
Fri, 19 Sep 2014 13:16:13 +0000 (14:16 +0100)
'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 <john.spray@redhat.com>
tasks/cephfs/fuse_mount.py
tasks/mds_client_limits.py
tasks/mds_client_recovery.py

index 37ef0789dfe784001feb710c22265988c3794ddf..2c4f886c308384463f0a3ff51f1a09fbcdb36d43 100644 (file)
@@ -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
         """
index a4a25ccc826bf4b0f11cc4463246846b975482c9..8ea8849f170ec8dc926657bf7170c1a910269abb 100644 (file)
@@ -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
index 7e3d28c99d5b8e133083839864fc87b6145b949e..bb8fe8231484efb086e6ba507abdc84e3c996cc8 100644 (file)
@@ -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)