]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: tolerate failed rank while waiting for state 24044/head
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 12 Sep 2018 01:49:18 +0000 (18:49 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 12 Sep 2018 13:37:13 +0000 (06:37 -0700)
Fixes: http://tracker.ceph.com/issues/35828
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/cephfs/filesystem.py

index b2837c2eee82da6592557539052a5c6bc5e85111..c0bbb20bb324785730aef286c7172d9caca51828 100644 (file)
@@ -947,9 +947,17 @@ class Filesystem(MDSCluster):
         while True:
             status = self.status()
             if rank is not None:
-                mds_info = status.get_rank(self.id, rank)
-                current_state = mds_info['state'] if mds_info else None
-                log.info("Looked up MDS state for mds.{0}: {1}".format(rank, current_state))
+                try:
+                    mds_info = status.get_rank(self.id, rank)
+                    current_state = mds_info['state'] if mds_info else None
+                    log.info("Looked up MDS state for mds.{0}: {1}".format(rank, current_state))
+                except:
+                    mdsmap = self.get_mds_map(status=status)
+                    if rank in mdsmap['failed']:
+                        log.info("Waiting for rank {0} to come back.".format(rank))
+                        current_state = None
+                    else:
+                        raise
             elif mds_id is not None:
                 # mds_info is None if no daemon with this ID exists in the map
                 mds_info = status.get_mds(mds_id)