@@ -395,7 +395,7 @@ def is_marked_damaged(self, rank):
395395 mds_map = self .fs .get_mds_map ()
396396 return rank in mds_map ['damaged' ]
397397
398- def _rebuild_metadata (self , workload , workers = 1 ):
398+ def _rebuild_metadata (self , workload , workers = 1 , unmount = True ):
399399 """
400400 That when all objects in metadata pool are removed, we can rebuild a metadata pool
401401 based on the contents of a data pool, and a client can see and read our files.
@@ -407,7 +407,8 @@ def _rebuild_metadata(self, workload, workers=1):
407407
408408 # Unmount the client and flush the journal: the tool should also cope with
409409 # situations where there is dirty metadata, but we'll test that separately
410- self .mount_a .umount_wait ()
410+ if unmount :
411+ self .mount_a .umount_wait ()
411412 workload .flush ()
412413
413414 # Stop the MDS
@@ -469,7 +470,8 @@ def get_state(mds_id):
469470 workload .scrub ()
470471
471472 # Mount a client
472- self .mount_a .mount_wait ()
473+ if unmount :
474+ self .mount_a .mount_wait ()
473475
474476 # See that the files are present and correct
475477 errors = workload .validate ()
@@ -495,7 +497,7 @@ def test_rebuild_backtraceless(self):
495497 self ._rebuild_metadata (BacktracelessFile (self .fs , self .mount_a ))
496498
497499 def test_rebuild_backtraceless_with_lf_dir_removed (self ):
498- self ._rebuild_metadata (BacktracelessFileRemoveLostAndFoundDirectory (self .fs , self .mount_a ))
500+ self ._rebuild_metadata (BacktracelessFileRemoveLostAndFoundDirectory (self .fs , self .mount_a ), unmount = False )
499501
500502 def test_rebuild_moved_dir (self ):
501503 self ._rebuild_metadata (MovedDir (self .fs , self .mount_a ))
0 commit comments