From 77935cebb156726924d41e91becb1d7f988ac60f Mon Sep 17 00:00:00 2001 From: David Zafman Date: Wed, 22 Oct 2014 15:54:44 -0700 Subject: [PATCH] Thrasher: Disable ceph_objectstore_tool tests if old release missing command 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 (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 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tasks/ceph_manager.py b/tasks/ceph_manager.py index 544b3f38b4159..a94e00660578c 100644 --- a/tasks/ceph_manager.py +++ b/tasks/ceph_manager.py @@ -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 -- 2.39.5