ruanwenjun commented on code in PR #17320:
URL:
https://github.com/apache/dolphinscheduler/pull/17320#discussion_r2191971762
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/ProcessUtils.java:
##########
@@ -144,18 +156,54 @@ public static boolean kill(@NonNull TaskExecutionContext
request) {
*/
private static boolean sendKillSignal(String signal, String pids, String
tenantCode) {
try {
+ // 1. Send the kill signal
String killCmd = String.format("kill -s %s %s", signal, pids);
killCmd = OSUtils.getSudoCmd(tenantCode, killCmd);
log.info("Sending {} to process group: {}, command: {}", signal,
pids, killCmd);
OSUtils.exeCmd(killCmd);
+ // 2. Wait for the process to respond to the signal
+ ThreadUtils.sleep(SLEEP_TIME_MILLIS * PROCESS_STATUS_CHECK_DELAY);
Review Comment:
It's better to use while to check whether the process is still alive, if it
still alive after timeout, then use `kill -9`
##########
deploy/kubernetes/dolphinscheduler/README.md:
##########
@@ -141,6 +141,7 @@ Please refer to the [Quick Start in
Kubernetes](../../../docs/docs/en/guide/inst
| conf.common."login.user.keytab.username" | string |
`"[email protected]"` | login user from keytab username |
| conf.common."ml.mlflow.preset_repository" | string |
`"https://github.com/apache/dolphinscheduler-mlflow"` | mlflow task plugin
preset repository |
| conf.common."ml.mlflow.preset_repository_version" | string | `"main"` |
mlflow task plugin preset repository version |
+| conf.common."process.status.check.delay" | int | `5` | The delay before
checking the shell process status after termination (in seconds) |
Review Comment:
```suggestion
| conf.common."shell.kill.wait.timeout" | int | `30` | If the shell process
still active after this value, then will use kill -9 to kill it(in seconds) |
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]