Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions _cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2017,6 +2017,9 @@ def __init__(self):

def _do_command(self, obd):
args = copy.copy(self.args)
if args[0]=="deploy" and len(args)==1:
ROOT_IO.print("Use 'obd tool install %s' instead" % COMP_OCEANBASE_DIAGNOSTIC_TOOL)
return obd.install_tool(COMP_OCEANBASE_DIAGNOSTIC_TOOL)
for i in range(len(self.args)):
if isinstance(self.args[i], str) and (self.args[i].startswith('--') or self.args[i].startswith('-')):
if self.args[i] == "--help" or self.args[i] == "-h":
Expand Down
9 changes: 3 additions & 6 deletions core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4788,16 +4788,13 @@ def obdiag_func(self, args, deploy_name):
return False
cluster_config = deploy_config.components[component_name]
deploy_config.components[tool_name] = cluster_config

workflow_name='diag'
pkg = self.mirror_manager.get_best_pkg(name=tool_name)
if not pkg:
self._call_stdio('critical', '%s package not found' % tool_name)
return False
repository = self.repository_manager.create_instance_repository(pkg.name, pkg.version, pkg.md5)
deployed = self.obdiag_deploy(workflow_name)
tool = self.tool_manager.get_tool_config_by_name(tool_name)
if deployed and tool:
obdiag_tools = [tool for tool in self.tool_manager.get_tool_list() if tool.name == tool_name]
max_version_tool = max(t.config.version for t in obdiag_tools)
repository = self.repository_manager.get_repository(tool_name, max_version_tool)
self.repositories = [repository]
workflows = self.get_workflows(workflow_name, [repository])
return self.run_workflow(workflows, deploy_config.components, [repository], **{const.COMP_OCEANBASE_DIAGNOSTIC_TOOL: {"full_cmd": args, "deploy_config": deploy_config}})
Expand Down
Loading