]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/tasks/ceph_manager: get osds all in after thrashing
authorSage Weil <sage@redhat.com>
Tue, 20 Jun 2017 16:07:25 +0000 (12:07 -0400)
committerSage Weil <sage@redhat.com>
Tue, 20 Jun 2017 16:07:25 +0000 (12:07 -0400)
Otherwise we might end up with some PGs remapped, which means they won't
get scrubbed.

Signed-off-by: Sage Weil <sage@redhat.com>
qa/tasks/ceph_manager.py

index d976795ec453a9668200b9656a335cdd65d501c7..465da73d2358c3df21d8916b3cfe6b312426ec72 100644 (file)
@@ -607,6 +607,17 @@ class Thrasher:
             self.log("inning osd")
             self.in_osd()
 
+    def all_up_in(self):
+        """
+        Make sure all osds are up and fully in.
+        """
+        self.all_up();
+        for osd in self.live_osds:
+            self.ceph_manager.raw_cluster_cmd('osd', 'reweight',
+                                              str(osd), str(1))
+            self.ceph_manager.raw_cluster_cmd('osd', 'primary-affinity',
+                                              str(osd), str(1))
+
     def do_join(self):
         """
         Break out of this Ceph loop
@@ -978,7 +989,7 @@ class Thrasher:
         for service, opt, saved_value in self.saved_options:
             self._set_config(service, '*', opt, saved_value)
         self.saved_options = []
-        self.all_up()
+        self.all_up_in()
 
 
 class ObjectStoreTool: