You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "caishunfeng (via GitHub)" <gi...@apache.org> on 2023/05/26 01:41:46 UTC

[GitHub] [dolphinscheduler] caishunfeng commented on a diff in pull request #14176: [fix-#14174] ```sudo.enable = false ``` not work

caishunfeng commented on code in PR #14176:
URL: https://github.com/apache/dolphinscheduler/pull/14176#discussion_r1206146978


##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskDispatchProcessor.java:
##########
@@ -131,7 +132,7 @@ public void process(Channel channel, Command command) {
                 }
 
                 // check if the OS user exists
-                if (!OSUtils.getUserList().contains(taskExecutionContext.getTenantCode())) {
+                if (PropertyUtils.getBoolean(Constants.SUDO_ENABLE, true) && !OSUtils.getUserList().contains(taskExecutionContext.getTenantCode())) {

Review Comment:
   I don't think we should add this sudo judgment here.
   It's need to check tenant exist if we specify it in workflow, independent of whether or not you can sudo tenant.
   WDYT?



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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