]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: fix test_standby_for_invalid_fscid with vstart_runner 14272/head
authorJohn Spray <john.spray@redhat.com>
Fri, 31 Mar 2017 16:13:15 +0000 (12:13 -0400)
committerJohn Spray <john.spray@redhat.com>
Fri, 31 Mar 2017 16:13:57 +0000 (12:13 -0400)
Signed-off-by: John Spray <john.spray@redhat.com>
qa/tasks/cephfs/test_failover.py
qa/tasks/vstart_runner.py

index 18a35bbba04d4e7ea1cb0ab70c93e514e67348f7..85ef2b509fba427547eaac07616a15e2011c5e98 100644 (file)
@@ -4,7 +4,6 @@ from unittest import case, SkipTest
 
 from cephfs_test_case import CephFSTestCase
 from teuthology.exceptions import CommandFailedError
-from tasks.ceph_manager import CephManager
 from teuthology import misc as teuthology
 from tasks.cephfs.fuse_mount import FuseMount
 
@@ -558,19 +557,9 @@ class TestMultiFilesystems(CephFSTestCase):
         self.assertEqual(set(fs_b.get_active_names()), {mds_c, mds_d})
 
     def test_standby_for_invalid_fscid(self):
-        # Set invalid standby_fscid with other mds standby_rank
-        # stopping active mds service should not end up in mon crash
-
-        # Get configured mons in the cluster
-        first_mon = teuthology.get_first_mon(self.ctx, self.configs_set)
-        (mon,) = self.ctx.cluster.only(first_mon).remotes.iterkeys()
-        manager = CephManager(
-            mon,
-            ctx=self.ctx,
-            logger=log.getChild('ceph_manager'),
-        )
-        configured_mons = manager.get_mon_quorum()
-
+        """
+        That an invalid standby_fscid does not cause a mon crash
+        """
         use_daemons = sorted(self.mds_cluster.mds_ids[0:3])
         mds_a, mds_b, mds_c = use_daemons
         log.info("Using MDS daemons: {0}".format(use_daemons))
@@ -582,6 +571,10 @@ class TestMultiFilesystems(CephFSTestCase):
         # Create one fs
         fs_a = self.mds_cluster.newfs("cephfs")
 
+        # Get configured mons in the cluster, so we can see if any
+        # crashed later.
+        configured_mons = fs_a.mon_manager.get_mon_quorum()
+
         # Set all the daemons to have a rank assignment but no other
         # standby preferences.
         set_standby_for_rank(0, mds_a)
@@ -609,7 +602,8 @@ class TestMultiFilesystems(CephFSTestCase):
             fs_a.wait_for_daemons()
 
         #Get active mons from cluster
-        active_mons = manager.get_mon_quorum()
+        active_mons = fs_a.mon_manager.get_mon_quorum()
 
         #Check for active quorum mon status and configured mon status
-        self.assertEqual(active_mons, configured_mons, "Not all mons are in quorum Invalid standby invalid fscid test failed!")
+        self.assertEqual(active_mons, configured_mons,
+                "Not all mons are in quorum Invalid standby invalid fscid test failed!")
index d9cb0af7a1e557e96ff90bfe90837639aed087b1..297bd2bae7c5c2fce9219243fd7134f5df2143b0 100644 (file)
@@ -603,6 +603,10 @@ class LocalCephCluster(CephCluster):
         self.mon_manager = LocalCephManager()
         self._conf = defaultdict(dict)
 
+    @property
+    def admin_remote(self):
+        return LocalRemote()
+
     def get_config(self, key, service_type=None):
         if service_type is None:
             service_type = 'mon'
@@ -693,10 +697,6 @@ class LocalMgrCluster(LocalCephCluster, MgrCluster):
 
 
 class LocalFilesystem(Filesystem, LocalMDSCluster):
-    @property
-    def admin_remote(self):
-        return LocalRemote()
-
     def __init__(self, ctx, fscid=None, create=None):
         # Deliberately skip calling parent constructor
         self._ctx = ctx