YARN-11545. Fixed FS2CS ACL conversion when all users are allowed. (#5910)
This commit is contained in:
parent
04c34a2171
commit
6e6349c793
@ -432,13 +432,13 @@ public class FSConfigToCSConfigConverter {
|
|||||||
AccessControlList adminAcls = access.get(AccessType.ADMINISTER_QUEUE);
|
AccessControlList adminAcls = access.get(AccessType.ADMINISTER_QUEUE);
|
||||||
|
|
||||||
if (!submitAcls.getGroups().isEmpty() ||
|
if (!submitAcls.getGroups().isEmpty() ||
|
||||||
!submitAcls.getUsers().isEmpty()) {
|
!submitAcls.getUsers().isEmpty() || submitAcls.isAllAllowed()) {
|
||||||
capacitySchedulerConfig.set(PREFIX + queue + ".acl_submit_applications",
|
capacitySchedulerConfig.set(PREFIX + queue + ".acl_submit_applications",
|
||||||
submitAcls.getAclString());
|
submitAcls.getAclString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!adminAcls.getGroups().isEmpty() ||
|
if (!adminAcls.getGroups().isEmpty() ||
|
||||||
!adminAcls.getUsers().isEmpty()) {
|
!adminAcls.getUsers().isEmpty() || adminAcls.isAllAllowed()) {
|
||||||
capacitySchedulerConfig.set(PREFIX + queue + ".acl_administer_queue",
|
capacitySchedulerConfig.set(PREFIX + queue + ".acl_administer_queue",
|
||||||
adminAcls.getAclString());
|
adminAcls.getAclString());
|
||||||
}
|
}
|
||||||
|
@ -263,9 +263,9 @@ public class TestFSConfigToCSConfigConverter {
|
|||||||
conf.get(PREFIX + "root.admins.alice.acl_administer_queue"));
|
conf.get(PREFIX + "root.admins.alice.acl_administer_queue"));
|
||||||
|
|
||||||
// root.users.john
|
// root.users.john
|
||||||
assertEquals("root.users.john submit ACL", "john ",
|
assertEquals("root.users.john submit ACL", "*",
|
||||||
conf.get(PREFIX + "root.users.john.acl_submit_applications"));
|
conf.get(PREFIX + "root.users.john.acl_submit_applications"));
|
||||||
assertEquals("root.users.john admin ACL", "john ",
|
assertEquals("root.users.john admin ACL", "*",
|
||||||
conf.get(PREFIX + "root.users.john.acl_administer_queue"));
|
conf.get(PREFIX + "root.users.john.acl_administer_queue"));
|
||||||
|
|
||||||
// root.users.joe
|
// root.users.joe
|
||||||
|
@ -33,8 +33,8 @@
|
|||||||
<weight>1.0</weight>
|
<weight>1.0</weight>
|
||||||
<minResources>memory-mb=4096, vcores=1</minResources>
|
<minResources>memory-mb=4096, vcores=1</minResources>
|
||||||
<schedulingPolicy>drf</schedulingPolicy>
|
<schedulingPolicy>drf</schedulingPolicy>
|
||||||
<aclSubmitApps>john </aclSubmitApps>
|
<aclSubmitApps>*</aclSubmitApps>
|
||||||
<aclAdministerApps>john </aclAdministerApps>
|
<aclAdministerApps>*</aclAdministerApps>
|
||||||
<maxContainerAllocation>vcores=2,memory-mb=8192</maxContainerAllocation>
|
<maxContainerAllocation>vcores=2,memory-mb=8192</maxContainerAllocation>
|
||||||
</queue>
|
</queue>
|
||||||
<queue name="joe">
|
<queue name="joe">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user