-
Notifications
You must be signed in to change notification settings - Fork 5k
[Feature] DS can support task running on remote host, not just worker server. #11652
Description
Search before asking
- I had searched in the issues and found no similar feature requirement.
Description
Currently DS tasks can only run on worker servers, but in actual business scenarios, we often need to send tasks to remote server for execution, such as Shell Task.
So i suggest that could DS add a Host manage model under Security menu, such as Environment manage model. Then user can select the remote host to run the task.
📝 According to the communication at the bi-weekly meeting, the update plan is as follows:
-
Add
TaskRemoteServerentity indolphinscheduler-daomodel. -
Add a
task remote server managepage in Secerity menu, such as create, delete, edit and test connect.

-
Add a
task remote serverselect input (field:taskRemoteServerCode) inShellandPythontask form. -
Add
task_remote_server_codecolumn int_ds_task_instance、t_ds_task_definition、t_ds_task_definition_logtables. -
Add
taskRemoteServerCodefield inTaskInstance,TaskDefintion,TaskDefinitionLog,TaskNode, and addtaskRemoteServerInfofield inTaskInstance(not a table field). -
Add taskRemoteServerInfo(just contain ip, user, password, name) entity in dolphinscheduler-task-plugin model. And add taskRemoteServerInfofield in
TaskExecutionContext. -
Shell and Python task will check
TaskExecutionContext.getTaskRemoteServerInfo(), if not null, it will scp the command files and resource files to the task remote server, and send the start command to remote to exec it. If other task plugin need this feture, can also check this task server field. -
Use
JSch3rd to ssh and scp (scp resource files and command files to remote server). -
The task will ssh and scp to the task server as the DS running user, not tenant.
1. How to avoid causing IO overload?
The IO load will be protected by the following measures:
- When the IO usage of Wroker is high, the current task will be not executed.
- Set the total size threshold for single-task transfer files.
- Control transfer rate.
- Monitor the file transfer process, if the IO usage is too high, the transfer process will be terminated and the task will be set to fail.
2. Why do not use remote jar and let remote server download the resource files from resource center?
I think this will increase the complexity of the remote server's environment, because the remote server is not part of the DS cluster. For example, the remote user need have the permission to download the resource files, and need install JRE.
Use case
- User can manage the hosts in Security menu.
- When config the task node, the user can select the remote host to run this task.
Related issues
N/A
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
