YARN-10247. Application priority queue ACLs are not respected. Contributed by Sunil G

(cherry picked from commit 410c605aec)
This commit is contained in:
Szilard Nemeth 2020-04-29 15:53:30 +02:00
parent 75433a658d
commit 8ffe1f313c
2 changed files with 4 additions and 3 deletions

View File

@ -2686,10 +2686,10 @@ public Priority checkAndGetApplicationPriority(
}
// Lets check for ACLs here.
if (!appPriorityACLManager.checkAccess(user, queuePath, appPriority)) {
if (!appPriorityACLManager.checkAccess(user, normalizeQueueName(queuePath), appPriority)) {
throw new YarnException(new AccessControlException(
"User " + user + " does not have permission to submit/update "
+ applicationId + " for " + appPriority));
"User " + user + " does not have permission to submit/update "
+ applicationId + " for " + appPriority));
}
LOG.info("Priority '" + appPriority.getPriority()

View File

@ -143,6 +143,7 @@ private void submitAppToRMWithInValidAcl(String submitter,
.newInstance(appSubmissionContext);
try {
submitterClient.submitApplication(submitRequest);
Assert.fail();
} catch (YarnException ex) {
Assert.assertTrue(ex.getCause() instanceof RemoteException);
}