-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Describe the bug
When we restart the DS server, DS kills all the yarn apps.It happens when the task contains commands
To Reproduce
Expected behavior
A clear and concise description of what you expected to happen.
- Create a DS shell task with the command: yarn application -list
- Restart the DS server after starting the task
- Then you will see all the yarn apps will be killed by DS.
Screenshots
Which version of Dolphin Scheduler:
-[1.3.5]
Additional context
Requirement or improvement
DS will store the task execution log in the temporary log file, which contains the yarn app ids , so that DS service can restart the task after it is restarted.
The point is that DS only performs regular matching on yarn application id, and kill & restart yarn app ids. {@link org.apache.dolphinscheduler.server.utils.ProcessUtils#killYarnJob()},that method will get all the app ids from {@param taskExecutionContext} by {@method taskExecutionContext.getLogPath()}.
Repair suggestion: add salt value to the yarn app ids in the log, and get app ids after matching the salt value in LoggerUtils#getAppIds method when restarting.