github-actions[bot] commented on code in PR #65564:
URL: https://github.com/apache/doris/pull/65564#discussion_r3611853711


##########
docker/thirdparties/run-thirdparties-docker.sh:
##########
@@ -1492,18 +1553,33 @@ start_kerberos() {
     if ! awk -v ip="${IP_HOST}" '$1 == ip && $2 == "hadoop-master-2" { found = 
1 } END { exit !found }' /etc/hosts; then
         sudo sed -i "1i${IP_HOST} hadoop-master-2" /etc/hosts
     fi
-    register_stack_metadata "kerberos" 
"${ROOT}/docker-compose/kerberos/kerberos.yaml" ""
-    compose_cmd "${ROOT}/docker-compose/kerberos/kerberos.yaml" "" down 
--remove-orphans
-    sudo rm -rf "${ROOT}"/docker-compose/kerberos/data
+    register_stack_metadata "kerberos" "${KERBEROS_DIR}/kerberos.yaml" ""
+    compose_cmd "${KERBEROS_DIR}/kerberos.yaml" "" down --remove-orphans
+    sudo rm -rf "${KERBEROS_DIR}/data"
     if [[ "${STOP}" -ne 1 ]]; then
         echo "PREPARE KERBEROS DATA"
-        rm -rf "${ROOT}"/docker-compose/kerberos/two-kerberos-hives/*.keytab
-        rm -rf "${ROOT}"/docker-compose/kerberos/two-kerberos-hives/*.jks
-        rm -rf "${ROOT}"/docker-compose/kerberos/two-kerberos-hives/*.conf
-        compose_cmd "${ROOT}/docker-compose/kerberos/kerberos.yaml" "" up 
--remove-orphans --wait -d
-        sudo ln -sfn "${ROOT}/docker-compose/kerberos/two-kerberos-hives" 
/keytabs
-        sudo cp "${ROOT}"/docker-compose/kerberos/common/conf/doris-krb5.conf 
/keytabs/krb5.conf
-        sudo cp "${ROOT}"/docker-compose/kerberos/common/conf/doris-krb5.conf 
/etc/krb5.conf
+        rm -rf "${KERBEROS_DIR}"/two-kerberos-hives/*.keytab
+        rm -rf "${KERBEROS_DIR}"/two-kerberos-hives/*.jks
+        rm -rf "${KERBEROS_DIR}"/two-kerberos-hives/*.conf
+        compose_cmd "${KERBEROS_DIR}/kerberos.yaml" "" up --build 
--remove-orphans -d
+        for container in "${containers[@]}"; do
+            wait_for_kerberos_ready "${container}" &

Review Comment:
   If another component fails after these followers start but before Kerberos 
is ready, the global failure path only sends TERM to the registered top-level 
`start_kerberos` launcher. These two follower PIDs are function-local, and 
`start_kerberos` has no EXIT/TERM trap, so Bash leaves the root-owned `sudo 
timeout ... docker logs --follow` trees running for up to 20 minutes after the 
launcher is reaped. This is reproducible with the same non-interactive Bash 
parent/background-child shape and leaks readiness processes into retries/job 
cleanup. Please add a local cleanup trap that kills and waits every readiness 
PID (including its privileged descendants), or run the followers in a process 
group that the global handler terminates and reaps.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to