]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_manager: test offline split via ceph-objectstore-tool
authorJosh Durgin <jdurgin@redhat.com>
Sat, 6 Aug 2016 01:16:20 +0000 (18:16 -0700)
committerJosh Durgin <jdurgin@redhat.com>
Thu, 29 Sep 2016 00:40:36 +0000 (00:40 +0000)
When killing an osd, split all pools with a low threshold.
This will slow down tests, but should not impact correctness.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
(cherry picked from commit f28f881bda0ad426bfa9c0e22cc4658b2ce2ec5d)

tasks/ceph_manager.py

index 794aef44bf6887566d4e5c5c0ec07ff285f20efc..2b88b4aa11663a76723233846881654961f2827b 100644 (file)
@@ -286,6 +286,20 @@ class Thrasher:
             if imp_remote != exp_remote:
                 imp_remote.run(args=cmd)
 
+            # apply low split settings to each pool
+            for pool in self.ceph_manager.list_pools():
+                no_sudo_prefix = prefix[5:]
+                cmd = ("CEPH_ARGS='--filestore-merge-threshold 1 "
+                       "--filestore-split-multiple 1' sudo -E "
+                       + no_sudo_prefix + "--op apply-layout-settings --pool " + pool).format(id=osd)
+                proc = remote.run(args=cmd, wait=True, check_status=False, stderr=StringIO())
+                output = proc.stderr.getvalue()
+                if 'Couldn\'t find pool' in output:
+                    continue
+                if proc.exitstatus:
+                    raise Exception("ceph-objectstore-tool apply-layout-settings"
+                                    " failed with {status}".format(status=proc.exitstatus))
+
     def rm_past_intervals(self, osd=None):
         """
         :param osd: Osd to find pg to remove past intervals