ak99372 opened a new issue, #14488: URL: https://github.com/apache/dolphinscheduler/issues/14488
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Running pipeline with tenant that has empty space in the name (e.g. "Tenant C") will fail the workflow run. - Not much information is available in UI as to why the run failed.  ### What you expected to happen - workflow to execute successfully. - error to be shown in tasks log - tenant admin to validate and prevent invalid names ### How to reproduce 1. Create a tenant with a name "Tenant C" 2. Assign tenant to current user 3. Run workflow ### Anything else From the server logs ``` 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.794 +0000 org.apache.dolphinscheduler.common.utils.OSUtils:[302] - [WorkflowInstance-6][TaskInstance-16] - create linux os user: Tenant C 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.794 +0000 org.apache.dolphinscheduler.common.utils.OSUtils:[304] - [WorkflowInstance-6][TaskInstance-16] - execute cmd: sudo useradd -g root 2023-07-09 18:05:45 Tenant C 2023-07-09 18:05:45 [ERROR] 2023-07-10 01:05:45.800 +0000 org.apache.dolphinscheduler.common.utils.OSUtils:[288] - [WorkflowInstance-6][TaskInstance-16] - Usage: useradd [options] LOGIN 2023-07-09 18:05:45 useradd -D 2023-07-09 18:05:45 useradd -D [options] 2023-07-09 18:05:45 2023-07-09 18:05:45 Options: 2023-07-09 18:05:45 -b, --base-dir BASE_DIR base directory for the home directory of the 2023-07-09 18:05:45 new account 2023-07-09 18:05:45 -c, --comment COMMENT GECOS field of the new account 2023-07-09 18:05:45 -d, --home-dir HOME_DIR home directory of the new account 2023-07-09 18:05:45 -D, --defaults print or change default useradd configuration 2023-07-09 18:05:45 -e, --expiredate EXPIRE_DATE expiration date of the new account 2023-07-09 18:05:45 -f, --inactive INACTIVE password inactivity period of the new account 2023-07-09 18:05:45 -g, --gid GROUP name or ID of the primary group of the new 2023-07-09 18:05:45 account 2023-07-09 18:05:45 -G, --groups GROUPS list of supplementary groups of the new 2023-07-09 18:05:45 account 2023-07-09 18:05:45 -h, --help display this help message and exit 2023-07-09 18:05:45 -k, --skel SKEL_DIR use this alternative skeleton directory 2023-07-09 18:05:45 -K, --key KEY=VALUE override /etc/login.defs defaults 2023-07-09 18:05:45 -l, --no-log-init do not add the user to the lastlog and 2023-07-09 18:05:45 faillog databases 2023-07-09 18:05:45 -m, --create-home create the user's home directory 2023-07-09 18:05:45 -M, --no-create-home do not create the user's home directory 2023-07-09 18:05:45 -N, --no-user-group do not create a group with the same name as 2023-07-09 18:05:45 the user 2023-07-09 18:05:45 -o, --non-unique allow to create users with duplicate 2023-07-09 18:05:45 (non-unique) UID 2023-07-09 18:05:45 -p, --password PASSWORD encrypted password of the new account 2023-07-09 18:05:45 -r, --system create a system account 2023-07-09 18:05:45 -R, --root CHROOT_DIR directory to chroot into 2023-07-09 18:05:45 -s, --shell SHELL login shell of the new account 2023-07-09 18:05:45 -u, --uid UID user ID of the new account 2023-07-09 18:05:45 -U, --user-group create a group with the same name as the user 2023-07-09 18:05:45 -Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping 2023-07-09 18:05:45 2023-07-09 18:05:45 2023-07-09 18:05:45 org.apache.dolphinscheduler.common.shell.AbstractShell$ExitCodeException: Usage: useradd [options] LOGIN 2023-07-09 18:05:45 useradd -D 2023-07-09 18:05:45 useradd -D [options] 2023-07-09 18:05:45 2023-07-09 18:05:45 Options: 2023-07-09 18:05:45 -b, --base-dir BASE_DIR base directory for the home directory of the 2023-07-09 18:05:45 new account 2023-07-09 18:05:45 -c, --comment COMMENT GECOS field of the new account 2023-07-09 18:05:45 -d, --home-dir HOME_DIR home directory of the new account 2023-07-09 18:05:45 -D, --defaults print or change default useradd configuration 2023-07-09 18:05:45 -e, --expiredate EXPIRE_DATE expiration date of the new account 2023-07-09 18:05:45 -f, --inactive INACTIVE password inactivity period of the new account 2023-07-09 18:05:45 -g, --gid GROUP name or ID of the primary group of the new 2023-07-09 18:05:45 account 2023-07-09 18:05:45 -G, --groups GROUPS list of supplementary groups of the new 2023-07-09 18:05:45 account 2023-07-09 18:05:45 -h, --help display this help message and exit 2023-07-09 18:05:45 -k, --skel SKEL_DIR use this alternative skeleton directory 2023-07-09 18:05:45 -K, --key KEY=VALUE override /etc/login.defs defaults 2023-07-09 18:05:45 -l, --no-log-init do not add the user to the lastlog and 2023-07-09 18:05:45 faillog databases 2023-07-09 18:05:45 -m, --create-home create the user's home directory 2023-07-09 18:05:45 -M, --no-create-home do not create the user's home directory 2023-07-09 18:05:45 -N, --no-user-group do not create a group with the same name as 2023-07-09 18:05:45 the user 2023-07-09 18:05:45 -o, --non-unique allow to create users with duplicate 2023-07-09 18:05:45 (non-unique) UID 2023-07-09 18:05:45 -p, --password PASSWORD encrypted password of the new account 2023-07-09 18:05:45 -r, --system create a system account 2023-07-09 18:05:45 -R, --root CHROOT_DIR directory to chroot into 2023-07-09 18:05:45 -s, --shell SHELL login shell of the new account 2023-07-09 18:05:45 -u, --uid UID user ID of the new account 2023-07-09 18:05:45 -U, --user-group create a group with the same name as the user 2023-07-09 18:05:45 -Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping 2023-07-09 18:05:45 2023-07-09 18:05:45 2023-07-09 18:05:45 at org.apache.dolphinscheduler.common.shell.AbstractShell.runCommand(AbstractShell.java:207) 2023-07-09 18:05:45 at org.apache.dolphinscheduler.common.shell.AbstractShell.run(AbstractShell.java:122) 2023-07-09 18:05:45 at org.apache.dolphinscheduler.common.shell.ShellExecutor.execute(ShellExecutor.java:126) 2023-07-09 18:05:45 at org.apache.dolphinscheduler.common.shell.ShellExecutor.execCommand(ShellExecutor.java:103) 2023-07-09 18:05:45 at org.apache.dolphinscheduler.common.shell.ShellExecutor.execCommand(ShellExecutor.java:86) 2023-07-09 18:05:45 at org.apache.dolphinscheduler.common.utils.OSUtils.exeShell(OSUtils.java:412) 2023-07-09 18:05:45 at org.apache.dolphinscheduler.common.utils.OSUtils.exeCmd(OSUtils.java:401) 2023-07-09 18:05:45 at org.apache.dolphinscheduler.common.utils.OSUtils.createLinuxUser(OSUtils.java:305) 2023-07-09 18:05:45 at org.apache.dolphinscheduler.common.utils.OSUtils.createUser(OSUtils.java:284) 2023-07-09 18:05:45 at org.apache.dolphinscheduler.common.utils.OSUtils.createUserIfAbsent(OSUtils.java:260) 2023-07-09 18:05:45 at org.apache.dolphinscheduler.server.worker.processor.TaskDispatchProcessor.process(TaskDispatchProcessor.java:130) 2023-07-09 18:05:45 at org.apache.dolphinscheduler.server.worker.processor.TaskDispatchProcessor$$FastClassBySpringCGLIB$$405f5d7.invoke(<generated>) 2023-07-09 18:05:45 at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) 2023-07-09 18:05:45 at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783) 2023-07-09 18:05:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) 2023-07-09 18:05:45 at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) 2023-07-09 18:05:45 at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89) 2023-07-09 18:05:45 at io.micrometer.core.aop.CountedAspect.interceptAndRecord(CountedAspect.java:199) 2023-07-09 18:05:45 at sun.reflect.GeneratedMethodAccessor661.invoke(Unknown Source) 2023-07-09 18:05:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 2023-07-09 18:05:45 at java.lang.reflect.Method.invoke(Method.java:498) 2023-07-09 18:05:45 at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634) 2023-07-09 18:05:45 at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624) 2023-07-09 18:05:45 at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72) 2023-07-09 18:05:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) 2023-07-09 18:05:45 at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) 2023-07-09 18:05:45 at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89) 2023-07-09 18:05:45 at io.micrometer.core.aop.TimedAspect.processWithTimer(TimedAspect.java:192) 2023-07-09 18:05:45 at io.micrometer.core.aop.TimedAspect.timedMethod(TimedAspect.java:170) 2023-07-09 18:05:45 at sun.reflect.GeneratedMethodAccessor682.invoke(Unknown Source) 2023-07-09 18:05:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 2023-07-09 18:05:45 at java.lang.reflect.Method.invoke(Method.java:498) 2023-07-09 18:05:45 at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634) 2023-07-09 18:05:45 at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624) 2023-07-09 18:05:45 at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72) 2023-07-09 18:05:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) 2023-07-09 18:05:45 at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) 2023-07-09 18:05:45 at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) 2023-07-09 18:05:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) 2023-07-09 18:05:45 at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) 2023-07-09 18:05:45 at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698) 2023-07-09 18:05:45 at org.apache.dolphinscheduler.server.worker.processor.TaskDispatchProcessor$$EnhancerBySpringCGLIB$$c1beefea.process(<generated>) 2023-07-09 18:05:45 at org.apache.dolphinscheduler.remote.handler.NettyServerHandler.lambda$processReceived$0(NettyServerHandler.java:129) 2023-07-09 18:05:45 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 2023-07-09 18:05:45 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 2023-07-09 18:05:45 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 2023-07-09 18:05:45 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 2023-07-09 18:05:45 at java.lang.Thread.run(Thread.java:750) 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.800 +0000 org.apache.dolphinscheduler.common.utils.OSUtils:[261] - [WorkflowInstance-6][TaskInstance-16] - create user Tenant C fail 2023-07-09 18:05:45 [ERROR] 2023-07-10 01:05:45.801 +0000 org.apache.dolphinscheduler.server.worker.processor.TaskDispatchProcessor:[135] - [WorkflowInstance-6][TaskInstance-16] - tenantCode: Tenant C does not exist, taskInstanceId: 16 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.803 +0000 org.apache.dolphinscheduler.server.master.processor.TaskExecuteResponseProcessor:[69] - [WorkflowInstance-6][TaskInstance-16] - Received task execute result, event: TaskEvent(taskInstanceId=16, workerAddress=172.17.0.3:1234, state=FAILURE, startTime=null, endTime=Mon Jul 10 01:05:45 UTC 2023, executePath=null, logPath=/opt/dolphinscheduler/logs/20230710/10178560383904_5-6-16.log, processId=0, appIds=null, event=RESULT, varPool=[], channel=[id: 0x4949f6bb, L:/172.17.0.3:5678 - R:/172.17.0.3:47338], processInstanceId=6) 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.925 +0000 org.apache.dolphinscheduler.server.master.processor.queue.TaskExecuteRunnable:[57] - [WorkflowInstance-6][TaskInstance-16] - Handle task event begin: TaskEvent(taskInstanceId=16, workerAddress=172.17.0.3:1234, state=null, startTime=null, endTime=null, executePath=null, logPath=null, processId=0, appIds=null, event=DISPATCH, varPool=null, channel=null, processInstanceId=6) 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.926 +0000 org.apache.dolphinscheduler.server.master.processor.queue.TaskExecuteRunnable:[60] - [WorkflowInstance-6][TaskInstance-16] - Handle task event finished: TaskEvent(taskInstanceId=16, workerAddress=172.17.0.3:1234, state=null, startTime=null, endTime=null, executePath=null, logPath=null, processId=0, appIds=null, event=DISPATCH, varPool=null, channel=null, processInstanceId=6) 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.926 +0000 org.apache.dolphinscheduler.server.master.processor.queue.TaskExecuteRunnable:[57] - [WorkflowInstance-6][TaskInstance-16] - Handle task event begin: TaskEvent(taskInstanceId=16, workerAddress=172.17.0.3:1234, state=FAILURE, startTime=null, endTime=Mon Jul 10 01:05:45 UTC 2023, executePath=null, logPath=/opt/dolphinscheduler/logs/20230710/10178560383904_5-6-16.log, processId=0, appIds=null, event=RESULT, varPool=[], channel=[id: 0x4949f6bb, L:/172.17.0.3:5678 - R:/172.17.0.3:47338], processInstanceId=6) 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.927 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool:[98] - [WorkflowInstance-6][TaskInstance-16] - Submit state event success, stateEvent: StateEvent(key=null, type=TASK_STATE_CHANGE, executionStatus=FAILURE, taskInstanceId=16, taskCode=0, processInstanceId=6, context=null, channel=null) 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.927 +0000 org.apache.dolphinscheduler.server.master.processor.queue.TaskExecuteRunnable:[60] - [WorkflowInstance-6][TaskInstance-16] - Handle task event finished: TaskEvent(taskInstanceId=16, workerAddress=172.17.0.3:1234, state=FAILURE, startTime=null, endTime=Mon Jul 10 01:05:45 UTC 2023, executePath=null, logPath=/opt/dolphinscheduler/logs/20230710/10178560383904_5-6-16.log, processId=0, appIds=null, event=RESULT, varPool=[], channel=[id: 0x4949f6bb, L:/172.17.0.3:5678 - R:/172.17.0.3:47338], processInstanceId=6) 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.927 +0000 org.apache.dolphinscheduler.server.master.processor.queue.TaskExecuteThreadPool:[114] - [WorkflowInstance-0][TaskInstance-0] - [WorkflowInstance-6] persist events succeeded 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.928 +0000 org.apache.dolphinscheduler.server.worker.processor.TaskExecuteResultAckProcessor:[61] - [WorkflowInstance-0][TaskInstance-0] - task execute response ack command : TaskExecuteAckCommand(super=BaseCommand(messageSenderAddress=172.17.0.3:5678, messageReceiverAddress=172.17.0.3:1234, messageSendTime=1688951145927), taskInstanceId=16, status=7) 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.939 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable:[270] - [WorkflowInstance-6][TaskInstance-16] - Begin to handle state event, StateEvent(key=null, type=TASK_STATE_CHANGE, executionStatus=FAILURE, taskInstanceId=16, taskCode=0, processInstanceId=6, context=null, channel=null) 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.939 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable:[364] - [WorkflowInstance-6][TaskInstance-16] - TaskInstance finished task code:10178557080224 state:FAILURE 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.939 +0000 org.apache.dolphinscheduler.server.master.runner.StateWheelExecuteThread:[194] - [WorkflowInstance-6][TaskInstance-16] - remove task instance from timeout check list 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.939 +0000 org.apache.dolphinscheduler.server.master.runner.StateWheelExecuteThread:[217] - [WorkflowInstance-6][TaskInstance-16] - remove task instance from retry check list 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.940 +0000 org.apache.dolphinscheduler.server.master.runner.StateWheelExecuteThread:[236] - [WorkflowInstance-6][TaskInstance-16] - Removed task instance from state check list 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.940 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable:[1684] - [WorkflowInstance-6][TaskInstance-16] - add task to stand by list, task name:Yellow_23n, task id:0, task code:10178587069344 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.940 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable:[1810] - [WorkflowInstance-6][TaskInstance-16] - Task dependent result is failed, taskInstanceId:0 depend result : FAILED 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.940 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable:[1448] - [WorkflowInstance-6][TaskInstance-16] - The current process has failed task, the current process failed 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.940 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable:[1572] - [WorkflowInstance-6][TaskInstance-16] - The workflowInstance is failed, the workflow status is FAILURE 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.940 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable:[1616] - [WorkflowInstance-6][TaskInstance-16] - Update workflowInstance states, origin state: RUNNING_EXECUTION, target state: FAILURE 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.941 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable:[1645] - [WorkflowInstance-6][TaskInstance-16] - Begin to update workflow instance state , state will change from RUNNING_EXECUTION to FAILURE 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.941 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable:[401] - [WorkflowInstance-6][TaskInstance-16] - TaskInstance finished will try to update the workflow instance state, task code:10178557080224 state:FAILURE 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.941 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable:[1448] - [WorkflowInstance-6][TaskInstance-16] - The current process has failed task, the current process failed 2023-07-09 18:05:45 [INFO] 2023-07-10 01:05:45.941 +0000 org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable:[1572] - [WorkflowInstance-6][TaskInstance-16] - The workflowInstance is failed, the workflow status is FAILURE ``` ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
