From 77ee5a07142320b234a5cb99226460f75858ac48 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 25 Jul 2013 13:54:20 -0700 Subject: [PATCH] ceph_manager: try both new and old tell mon.* syntax So we can test old code with new teuthology (e.g., upgrade testing) Signed-off-by: Sage Weil --- teuthology/task/ceph_manager.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/teuthology/task/ceph_manager.py b/teuthology/task/ceph_manager.py index 92c6c52941a..60ab49efe69 100644 --- a/teuthology/task/ceph_manager.py +++ b/teuthology/task/ceph_manager.py @@ -36,8 +36,13 @@ class Thrasher: if self.config is None: self.config = dict() # prevent monitor from auto-marking things out while thrasher runs - manager.raw_cluster_cmd('--', 'tell', 'mon.*', 'injectargs', - '--mon-osd-down-out-interval', '0') + # try both old and new tell syntax, in case we are testing old code + try: + manager.raw_cluster_cmd('--', 'tell', 'mon.*', 'injectargs', + '--mon-osd-down-out-interval', '0') + except: + manager.raw_cluster_cmd('--', 'mon', 'tell', '*', 'injectargs', + '--mon-osd-down-out-interval', '0') self.thread = gevent.spawn(self.do_thrash) def kill_osd(self, osd=None):