Skip to content

[Bug][MASTER] DS kill all yarn apps #5186

@zhangsaisai1995

Description

@zhangsaisai1995

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.

  1. Create a DS shell task with the command: yarn application -list
  2. Restart the DS server after starting the task
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions