From 93892eb82a235557dcbe6fae77212f87e8c95d5e Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 6 Apr 2016 15:45:09 -0700 Subject: [PATCH] ceph_manager: return exit status on do_get, do_put, do_rm Signed-off-by: Samuel Just --- tasks/ceph_manager.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tasks/ceph_manager.py b/tasks/ceph_manager.py index 7d617375963ab..18ff3b9de5bd7 100644 --- a/tasks/ceph_manager.py +++ b/tasks/ceph_manager.py @@ -838,7 +838,7 @@ class CephManager: return self.controller.run(args=["sudo", "daemon-helper", "kill", "ceph", "-w"], wait=False, stdout=StringIO(), stdin=run.PIPE) - def do_rados(self, remote, cmd): + def do_rados(self, remote, cmd, check_status=True): """ Execute a remote rados command. """ @@ -853,6 +853,7 @@ class CephManager: proc = remote.run( args=pre, wait=True, + check_status=check_status ) return proc @@ -887,8 +888,9 @@ class CephManager: ] return self.do_rados( self.controller, - args - ) + args, + check_status=False + ).exitstatus def do_get(self, pool, obj, fname='/dev/null', namespace=None): """ @@ -904,9 +906,9 @@ class CephManager: ] return self.do_rados( self.controller, - args - ) - + args, + check_status=False + ).exitstatus def do_rm(self, pool, obj, namespace=None): """ @@ -921,8 +923,9 @@ class CephManager: ] return self.do_rados( self.controller, - args - ) + args, + check_status=False + ).exitstatus def osd_admin_socket(self, osd_id, command, check_status=True): return self.admin_socket('osd', osd_id, command, check_status) -- 2.39.5