],
)
- # 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
"""
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)
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
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):
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()
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()
# 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
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)