]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test: Thrasher: restore changed options after done with thrash
authorKefu Chai <kchai@redhat.com>
Sun, 12 Feb 2017 06:13:14 +0000 (14:13 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 13 Feb 2017 01:25:51 +0000 (09:25 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/tasks/ceph_manager.py

index 7496c876c746f19172802f33f3bd048cd0822778..3c693331fa2acd1d4b868deab270737c4a63e259 100644 (file)
@@ -138,7 +138,13 @@ class Thrasher:
             self.config = dict()
         # prevent monitor from auto-marking things out while thrasher runs
         # try both old and new tell syntax, in case we are testing old code
-        self._set_config('mon', '*', 'mon-osd-down-out-interval', 0)
+        self.saved_options = {}
+        first_mon = teuthology.get_first_mon(manager.ctx, self.config).split('.')
+        opt_name = 'mon_osd_down_out_interval'
+        self.saved_options[opt_name] = manager.get_config(first_mon[0],
+                                                          first_mon[1],
+                                                          opt_name)
+        self._set_config('mon', '*', opt_name, 0)
         # initialize ceph_objectstore_tool property - must be done before
         # do_thrash is spawned - http://tracker.ceph.com/issues/18799
         if (self.config.get('powercycle') or
@@ -857,6 +863,9 @@ class Thrasher:
             if self.ceph_manager.get_pool_pg_num(pool) > 0:
                 self.fix_pgp_num(pool)
         self.pools_to_fix_pgp_num.clear()
+        for opt, value in self.saved_options.iteritems():
+            self._set_config('mon', '*', opt, value)
+        self.saved_options.clear()
         self.all_up()