]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: optionally use old fs name during cephfs remount 22971/head
authorPatrick Donnelly <pdonnell@redhat.com>
Sat, 14 Jul 2018 01:15:17 +0000 (18:15 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Sat, 14 Jul 2018 01:16:06 +0000 (18:16 -0700)
This fixes errors caused by remount done by some tests (test_recovery_pool.py)
where the fs name is not given.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/cephfs/mount.py

index fbff376041ef25f197577435a9bfd7a30a4fa69b..16b2149a819cc86c6a862d895fdf7e86cf72ffe5 100644 (file)
@@ -41,6 +41,9 @@ class CephFSMount(object):
         raise NotImplementedError()
 
     def setupfs(self, name=None):
+        if name is None and self.fs is not None:
+            # Previous mount existed, reuse the old name
+            name = self.fs.name
         self.fs = Filesystem(self.ctx, name=name)
         log.info('Wait for MDS to reach steady state...')
         self.fs.wait_for_daemons()