MCPcopy Create free account
hub / github.com/ceph/ceph / run_cluster_cmd

Method run_cluster_cmd

qa/tasks/ceph_manager.py:1671–1704  ·  view source on GitHub ↗

Run a Ceph command and return the object representing the process for the command. Accepts arguments same as that of teuthology.orchestra.run.run()

(self, **kwargs)

Source from the content-addressed store, hash-verified

1669 return self.run_cluster_cmd(args=args, stdout=stdout, stderr=stderr, **kwargs)
1670
1671 def run_cluster_cmd(self, **kwargs):
1672 """
1673 Run a Ceph command and return the object representing the process
1674 for the command.
1675
1676 Accepts arguments same as that of teuthology.orchestra.run.run()
1677 """
1678 if isinstance(kwargs['args'], str):
1679 kwargs['args'] = shlex.split(kwargs['args'])
1680 elif isinstance(kwargs['args'], tuple):
1681 kwargs['args'] = list(kwargs['args'])
1682
1683 prefixcmd = []
1684 timeoutcmd = kwargs.pop('timeoutcmd', None)
1685 if timeoutcmd is not None:
1686 prefixcmd += ['timeout', str(timeoutcmd)]
1687
1688 if self.cephadm:
1689 prefixcmd += ['ceph']
1690 cmd = prefixcmd + list(kwargs['args'])
1691 return shell(self.ctx, self.cluster, self.controller,
1692 args=cmd,
1693 stdout=StringIO(),
1694 check_status=kwargs.get('check_status', True))
1695 elif self.rook:
1696 prefixcmd += ['ceph']
1697 cmd = prefixcmd + list(kwargs['args'])
1698 return toolbox(self.ctx, self.cluster,
1699 args=cmd,
1700 stdout=StringIO(),
1701 check_status=kwargs.get('check_status', True))
1702 else:
1703 kwargs['args'] = prefixcmd + self.get_ceph_cmd(**kwargs) + kwargs['args']
1704 return self.controller.run(**kwargs)
1705
1706 def raw_cluster_cmd(self, *args, **kwargs) -> str:
1707 """

Callers 10

cephMethod · 0.95
raw_cluster_cmdMethod · 0.95
get_keyringMethod · 0.95
run_ceph_cmdMethod · 0.80
test_auth_capsMethod · 0.80

Calls 8

get_ceph_cmdMethod · 0.95
toolboxFunction · 0.85
shellFunction · 0.70
listFunction · 0.50
splitMethod · 0.45
popMethod · 0.45
getMethod · 0.45
runMethod · 0.45