You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "yosifkit (via GitHub)" <gi...@apache.org> on 2023/05/31 18:42:24 UTC

[GitHub] [spark-docker] yosifkit commented on a diff in pull request #43: [SPARK-43370] Switch spark user only when run driver and executor

yosifkit commented on code in PR #43:
URL: https://github.com/apache/spark-docker/pull/43#discussion_r1212153792


##########
3.4.0/scala2.12-java11-ubuntu/entrypoint.sh:
##########
@@ -95,20 +104,13 @@ case "$1" in
       --resourceProfileId $SPARK_RESOURCE_PROFILE_ID
       --podName $SPARK_EXECUTOR_POD_NAME
     )
+    # Execute the container CMD under tini for better hygiene
+    exec $(switch_spark_if_root) /usr/bin/tini -s -- "${CMD[@]}"
     ;;
 
   *)
     # Non-spark-on-k8s command provided, proceeding in pass-through mode...
     CMD=("$@")
+    "${CMD[@]}"

Review Comment:
   This should have `exec` as well. Simplified, it could be `exec "$@"`. (Applies here or to #44)



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org