Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating Users on Linux System Using Tenent_id in k8s Environment #16009

Closed
2 tasks done
wjmmjr opened this issue May 16, 2024 · 1 comment
Closed
2 tasks done

Creating Users on Linux System Using Tenent_id in k8s Environment #16009

wjmmjr opened this issue May 16, 2024 · 1 comment
Labels
DSIP Waiting for reply Waiting for reply

Comments

@wjmmjr
Copy link

wjmmjr commented May 16, 2024

Search before asking

  • I had searched in the DSIP and found no similar DSIP.

Motivation

When deploying the dolphinscheduler worker service in a k8s environment and mounting PVC, all files in the PVC have corresponding users. When the dolphinscheduler worker service restarts, the users in the container are cleared, and the users are recreated in order of connecting to the dolphinscheduler worker. At this time, the username and userid are not consistent with the situation before restarting. Due to the username and userid matching in the PVC file, the user corresponding to the PVC file is incorrect after restarting the container

Design Detail

Add tenantId to ProcessInstance.java and TaskExecutionContext.java
Add method "createUser(int userId, String userName)" and "createUserIfAbsent(int userId, String userName)" and "createLinuxUser(int userId, String userName, String userGroup)" to OSUtils.java
Modify method createTenant of TenantServiceImpl.java
Modify method handleCommand of ProcessServiceImpl.java,add code "processInstance.setTenantId"
Modify method buildProcessInstanceRelatedInfo of TaskExecutionContextBuilder.java,add code "taskExecutionContext.setTenantId"
Modify method getOrCreateTenant of TaskExecutionContextUtils.java, add user by tenantId

code : https://github.com/wjmmjr/dolphinscheduler.git

Compatibility, Deprecation, and Migration Plan

No response

Test Plan

Run the dolphinscheduler worker service in the k8s environment and mount the shared PVC. Use different users to submit tasks, generate files in the PVC, and restart the dolphinscheduler worker service repeatedly. At this time, the user IDs in each worker are inconsistent

Code of Conduct

@wjmmjr wjmmjr added DSIP Waiting for reply Waiting for reply labels May 16, 2024
@davidzollo
Copy link
Contributor

davidzollo commented May 21, 2024

repeated issue with #16008, close this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DSIP Waiting for reply Waiting for reply
Projects
None yet
Development

No branches or pull requests

2 participants