-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
YARN-9834. Allow using a pool of local users to run Yarn Secure Conta… #1446
base: trunk
Are you sure you want to change the base?
Conversation
…iner in secure mode Signed-off-by: Shanyu Zhao <shzhao@microsoft.com>
💔 -1 overall
This message was automatically generated. |
Signed-off-by: Shanyu Zhao <shzhao@microsoft.com>
LOG.error(errMsg); | ||
return; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
localUserInfo.fileOpCount--; | ||
LOG.info("Decremented fileOpCount for appUser " + appUser + | ||
" to " + localUserInfo.fileOpCount); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
} | ||
if (index == -1) { | ||
String errMsg = "Cannot allocate local users from a pool of " + | ||
localUserCount; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
int appCount; | ||
int fileOpCount; | ||
int logHandlingCount; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
* Maintains the appUser to local user mapping, until: | ||
* a) all applications of the appUser is finished; | ||
* b) all FileDeletionTask for that appUser is executed; | ||
* c) all log aggregation/handling requests for appUser's applications are done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
💔 -1 overall
This message was automatically generated. |
Signed-off-by: Shanyu Zhao <shzhao@microsoft.com>
} | ||
if (index == -1) { | ||
String errMsg = "Cannot allocate local users from a pool of " + | ||
localUserCount; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
int appCount; | ||
int fileOpCount; | ||
int logHandlingCount; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
💔 -1 overall
This message was automatically generated. |
Signed-off-by: Shanyu Zhao <shzhao@microsoft.com>
} | ||
if (index == -1) { | ||
String errMsg = "Cannot allocate local users from a pool of " + | ||
localUserCount; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
int appCount; | ||
int fileOpCount; | ||
int logHandlingCount; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
💔 -1 overall
This message was automatically generated. |
@@ -1611,7 +1625,7 @@ private void cleanUpFilesPerUserDir(FileContext lfs, DeletionService del, | |||
String owner = status.getOwner(); | |||
List<Path> pathList = new ArrayList<>(); | |||
pathList.add(status.getPath()); | |||
FileDeletionTask deletionTask = new FileDeletionTask(del, owner, null, | |||
FileDeletionTask deletionTask = new FileDeletionTask(del, null, null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change intentional? I am not sure if I understand why the information of the user deleting the file is not required?
YarnConfiguration.NM_SECURE_MODE_USE_POOL_USER, | ||
YarnConfiguration.DEFAULT_NM_SECURE_MODE_USE_POOL_USER); | ||
if (this.disablePrivateVis) { | ||
LOG.info("When " + YarnConfiguration.NM_SECURE_MODE_USE_POOL_USER + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All resources can either be public
or application
. It seems this constraint is added since a local-user
may get assigned to different real-users
. Can you comment on the cases where a real user application may require private
resources and local-user-pooling
is enabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will add comments. Basically if a real user application require private resources, when local user pooling is enabled, we will treat the private resources as application resources. This means for each application we will download (localize) the resources to application folder, and will delete it after the application is finished.
…ainer Signed-off-by: Shanyu Zhao <shzhao@microsoft.com>
} | ||
if (index == -1) { | ||
String errMsg = "Cannot allocate local users from a pool of " + | ||
localUserCount; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
int appCount; | ||
int fileOpCount; | ||
int logHandlingCount; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
💔 -1 overall
This message was automatically generated. |
…ainer Fix the issue when deallocating local user for an appuser, usercache/<appuser>/appcache folder still exists. After deallocating appUser from localUser, we will check if usercache folder for the appUser exists, if yes, then queue FileDeletionTasks to delete. Signed-off-by: Shanyu Zhao <shzhao@microsoft.com>
Signed-off-by: Shanyu Zhao <shzhao@microsoft.com>
} | ||
if (index == -1) { | ||
String errMsg = "Cannot allocate local users from a pool of " + | ||
localUserCount; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
int appCount; | ||
int fileOpCount; | ||
int logHandlingCount; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
💔 -1 overall
This message was automatically generated. |
Signed-off-by: Shanyu Zhao <shzhao@microsoft.com>
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
…iner in secure mode
Signed-off-by: Shanyu Zhao shzhao@microsoft.com
https://issues.apache.org/jira/browse/YARN-9834