mirror of
https://github.com/ceph/ceph
synced 2025-01-01 16:42:29 +00:00
Merge pull request #39690 from rishabh-d-dave/qa-raw_cluster_cmd
qa/ceph_manger: fixes bugs in CephManager Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
commit
3cdb88b0ac
@ -1419,15 +1419,18 @@ class CephManager:
|
||||
"""
|
||||
Start ceph on a raw cluster. Return count
|
||||
"""
|
||||
stdout = kwargs.pop('stdout', StringIO())
|
||||
p = self.run_cluster_cmd(args=args, stdout=stdout, **kwargs)
|
||||
return p.stdout.getvalue()
|
||||
if kwargs.get('args') is None and args:
|
||||
kwargs['args'] = args
|
||||
kwargs['stdout'] = kwargs.pop('stdout', StringIO())
|
||||
return self.run_cluster_cmd(**kwargs).stdout.getvalue()
|
||||
|
||||
def raw_cluster_cmd_result(self, *args, **kwargs):
|
||||
"""
|
||||
Start ceph on a cluster. Return success or failure information.
|
||||
"""
|
||||
kwargs['args'], kwargs['check_status'] = args, False
|
||||
if kwargs.get('args') is None and args:
|
||||
kwargs['args'] = args
|
||||
kwargs['check_status'] = False
|
||||
return self.run_cluster_cmd(**kwargs).exitstatus
|
||||
|
||||
def run_ceph_w(self, watch_channel=None):
|
||||
|
@ -990,16 +990,18 @@ class LocalCephManager(CephManager):
|
||||
args like ["osd", "dump"}
|
||||
return stdout string
|
||||
"""
|
||||
kwargs['args'] = args
|
||||
if kwargs.get('stdout') is None:
|
||||
kwargs['stdout'] = StringIO()
|
||||
if kwargs.get('args') is None and args:
|
||||
kwargs['args'] = args
|
||||
kwargs['stdout'] = kwargs.pop('stdout', StringIO())
|
||||
return self.run_cluster_cmd(**kwargs).stdout.getvalue()
|
||||
|
||||
def raw_cluster_cmd_result(self, *args, **kwargs):
|
||||
"""
|
||||
like raw_cluster_cmd but don't check status, just return rc
|
||||
"""
|
||||
kwargs['args'], kwargs['check_status'] = args, False
|
||||
if kwargs.get('args') is None and args:
|
||||
kwargs['args'] = args
|
||||
kwargs['check_status'] = False
|
||||
return self.run_cluster_cmd(**kwargs).exitstatus
|
||||
|
||||
def admin_socket(self, daemon_type, daemon_id, command, check_status=True,
|
||||
|
Loading…
Reference in New Issue
Block a user