]> 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>
Thu, 23 Oct 2014 06:30:29 +0000 (23:30 -0700)
Leaving disabled until merge of import/export fixes

Fixes: #9805
Signed-off-by: David Zafman <dzafman@redhat.com>
tasks/ceph_manager.py

index 33c40c77a8b91dd93982a4c2852f8405c05a958d..bfc28fcb877169a0ea8f3e4961050dbf8af8c100 100644 (file)
@@ -12,6 +12,7 @@ from teuthology import misc as teuthology
 from tasks.scrub import Scrubber
 from util.rados import cmd_erasure_code_profile
 from teuthology.orchestra.remote import Remote
+import subprocess
 
 def make_admin_daemon_dir(ctx, remote):
     """
@@ -57,6 +58,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
@@ -77,7 +84,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