]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Thrasher: Disable ceph_objectstore_tool tests if old release missing command
authorDavid Zafman <dzafman@redhat.com>
Wed, 22 Oct 2014 22:54:44 +0000 (15:54 -0700)
committerDavid Zafman <dzafman@redhat.com>
Tue, 3 Mar 2015 23:59:05 +0000 (15:59 -0800)
Don't need to explicitly turn off the test during some upgrades
Leaving disabled until merge of import/export fixes

Fixes: #9805
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit a295c18a808033dfbdacf8801c26fed137ccab35)

Conflicts:
suites/upgrade/dumpling-firefly-x/stress-split/13-thrash/default.yaml (not in firefly)
suites/upgrade/dumpling/fs/4-final/osdthrash.yaml
suites/upgrade/dumpling/rbd/4-final/osdthrash.yaml
suites/upgrade/dumpling/rgw/4-final/osdthrash.yaml

tasks/ceph_manager.py

index 544b3f38b4159e762e836b12f11155562167043b..a94e00660578c8c9a4df1a0e0b18eac9762c8a95 100644 (file)
@@ -11,6 +11,7 @@ import os
 from teuthology import misc as teuthology
 from tasks.scrub import Scrubber
 from teuthology.orchestra.remote import Remote
+import subprocess
 
 def make_admin_daemon_dir(ctx, remote):
     """
@@ -56,6 +57,12 @@ def mount_osd_data(ctx, remote, osd):
             ]
             )
 
+
+def cmd_exists(cmd):
+    return subprocess.call("type " + cmd, shell=True,
+                           stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0
+
+
 class Thrasher:
     """
     Object used to thrash Ceph
@@ -76,7 +83,10 @@ class Thrasher:
             self.revive_timeout += 120
         self.clean_wait = self.config.get('clean_wait', 0)
         self.minin = self.config.get("min_in", 3)
-        self.ceph_objectstore_tool = self.config.get('ceph_objectstore_tool', False)
+        if cmd_exists("ceph_objectstore_tool"):
+            self.ceph_objectstore_tool = self.config.get('ceph_objectstore_tool', False)
+        else:
+            self.ceph_objectstore_tool = False
         self.chance_move_pg = self.config.get('chance_move_pg', 1.0)
 
         num_osds = self.in_osds + self.out_osds