]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_manager: do_pg_scrub: keep scrubbing until it's done
authorSamuel Just <sjust@redhat.com>
Thu, 19 Nov 2015 23:06:20 +0000 (15:06 -0800)
committerNathan Cutler <ncutler@suse.com>
Thu, 28 Jul 2016 17:45:23 +0000 (19:45 +0200)
The ceph pg scrub ... command isn't really guarranteed to
start a scrub, keep reissuing it until the scrub actually
happens.

Related: #12746
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 89dcc0daf31eabc04810f759e0694dc8303fee4d)

tasks/ceph_manager.py

index ca8c9f693393bd9422f377000f02082adcbddf00..962ae8d8300785e70c42e926a7a6b40bd0ae03ea 100644 (file)
@@ -1316,9 +1316,9 @@ class CephManager:
         Scrub pg and wait for scrubbing to finish
         """
         init = self.get_last_scrub_stamp(pool, pgnum)
-        self.raw_cluster_cmd('pg', stype, self.get_pgid(pool, pgnum))
         while init == self.get_last_scrub_stamp(pool, pgnum):
             self.log("waiting for scrub type %s" % (stype,))
+            self.raw_cluster_cmd('pg', stype, self.get_pgid(pool, pgnum))
             time.sleep(10)
 
     def get_single_pg_stats(self, pgid):