Skip to content

Commit

Permalink
test: Thrasher: restore changed options after done with thrash
Browse files Browse the repository at this point in the history
Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Feb 13, 2017
1 parent 761a1dc commit de59b51
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion qa/tasks/ceph_manager.py
Expand Up @@ -138,7 +138,13 @@ def tmp(x):
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
Expand Down Expand Up @@ -857,6 +863,9 @@ def do_thrash(self):
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()


Expand Down

0 comments on commit de59b51

Please sign in to comment.