Skip to content

Commit bfe574c

Browse files
committed
Merge PR ceph#57302 into main
* refs/pull/57302/head: qa/tasks/quiescer: dump ops in parallel Reviewed-by: Leonid Usov <[email protected]>
2 parents fcb2eb7 + 15f734e commit bfe574c

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

qa/tasks/quiescer.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,17 +186,19 @@ def dump_ops_all_ranks(self, dump_tag):
186186

187187
self.logger.debug(f"Dumping ops on rank {rank} ({name}) to a remote file {remote_path}")
188188
try:
189-
_ = self.fs.rank_tell(['ops', '--flags=locks', f'--path={daemon_path}'], rank=rank)
190-
remote_dumps.append((info, remote_path))
189+
args = ['tell', f'mds.{self.fs.id}:{rank}', 'ops', '--flags=locks', f'--path={daemon_path}']
190+
p = self.fs.run_ceph_cmd(args=args, wait=False, stdout=StringIO())
191+
remote_dumps.append((info, remote_path, p))
191192
except Exception as e:
192193
self.logger.error(f"Couldn't execute ops dump on rank {rank}, error: {e}")
193194

194195
# now get the ops from the files
195-
for info, remote_path in remote_dumps:
196+
for info, remote_path, p in remote_dumps:
197+
name = info['name']
198+
rank = info['rank']
199+
mds_remote = self.fs.mon_manager.find_remote('mds', name)
196200
try:
197-
name = info['name']
198-
rank = info['rank']
199-
mds_remote = self.fs.mon_manager.find_remote('mds', name)
201+
p.wait()
200202
blob = misc.get_file(mds_remote, remote_path, sudo=True).decode('utf-8')
201203
self.logger.debug(f"read {len(blob)}B of ops from '{remote_path}' on mds.{rank} ({name})")
202204
ops_dump = json.loads(blob)
@@ -218,7 +220,8 @@ def dump_ops_all_ranks(self, dump_tag):
218220
self.logger.info(f"Pulled {len(ops_dump['ops'])} ops from rank {rank} ({name}) into {out_name}")
219221
except Exception as e:
220222
self.logger.error(f"Couldn't pull ops dump at '{remote_path}' on rank {info['rank']} ({info['name']}), error: {e}")
221-
misc.delete_file(mds_remote, remote_path, sudo=True, check=False)
223+
finally:
224+
misc.delete_file(mds_remote, remote_path, sudo=True, check=False)
222225

223226
def get_set_state_name(self, response, set_id = None):
224227
if isinstance(response, (str, bytes, bytearray)):

0 commit comments

Comments
 (0)