mirror of
https://github.com/ceph/ceph
synced 2025-01-04 10:12:30 +00:00
Merge PR #54515 into main
* refs/pull/54515/head: qa: get_global_id() returns a string (global_id) qa: correct usage of DEBUGFS_META_DIR in dedent Reviewed-by: Rishabh Dave <ridave@redhat.com> Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
This commit is contained in:
commit
8518c699e7
@ -260,9 +260,10 @@ class KernelMount(CephFSMount):
|
||||
import json
|
||||
|
||||
def get_id_to_dir():
|
||||
result = {}
|
||||
meta_dir = "{meta_dir}"
|
||||
result = dict()
|
||||
for dir in glob.glob("/sys/kernel/debug/ceph/*"):
|
||||
if os.path.basename(dir) == DEBUGFS_META_DIR:
|
||||
if os.path.basename(dir) == meta_dir:
|
||||
continue
|
||||
mds_sessions_lines = open(os.path.join(dir, "mds_sessions")).readlines()
|
||||
global_id = mds_sessions_lines[0].split()[1].strip('"')
|
||||
@ -270,7 +271,7 @@ class KernelMount(CephFSMount):
|
||||
result[client_id] = global_id
|
||||
return result
|
||||
print(json.dumps(get_id_to_dir()))
|
||||
""")
|
||||
""".format(meta_dir=DEBUGFS_META_DIR))
|
||||
|
||||
output = self.client_remote.sh([
|
||||
'sudo', 'python3', '-c', pyscript
|
||||
@ -342,7 +343,7 @@ echo '{fdata}' | sudo tee /sys/kernel/debug/dynamic_debug/control
|
||||
if self.inst is not None:
|
||||
return self.inst
|
||||
|
||||
client_gid = "client%d" % self.get_global_id()
|
||||
client_gid = "client%d" % int(self.get_global_id())
|
||||
self.inst = " ".join([client_gid, self._global_addr])
|
||||
return self.inst
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user