]> 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)
committerSamuel Just <sjust@redhat.com>
Thu, 19 Nov 2015 23:07:38 +0000 (15:07 -0800)
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>
tasks/ceph_manager.py

index f68e07605db7037b097fbecb1068a99ef88b3075..396e5d814b5e6747bdf7150d86a2b64898f4673f 100644 (file)
@@ -1378,9 +1378,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):