manirajv06 commented on code in PR #720:
URL: https://github.com/apache/yunikorn-core/pull/720#discussion_r1410222535
##########
pkg/common/configs/configvalidator.go:
##########
@@ -172,6 +172,11 @@ func checkLimitResource(cur QueueConfig, users
map[string]map[string]*resources.
}
// Override with min resource
users[curQueuePath][user] =
resources.ComponentWiseMinPermissive(limitMaxResources, userMaxResource)
+ } else if wildcardMaxResource, ok :=
users[queuePath][common.Wildcard]; user != common.Wildcard && ok {
+ if
!wildcardMaxResource.FitInMaxUndef(limitMaxResources) {
+ return fmt.Errorf("user %s max resource
%s of queue %s is greater than wildcard maximum resource %s of immediate or
ancestor parent queue", user, limitMaxResources.String(), cur.Name,
wildcardMaxResource.String())
+ }
+ users[curQueuePath][user] = limitMaxResources
Review Comment:
Ok. I tried to recollect but not able to capture completely. May be because
of error message mismatch in the above case, I would have thought that it has
failed. Please try the below test code and you can see error message mismatch.
{
name: "leaf queue user maxresources exceed grandparent
queue wildcard maxresources",
config: QueueConfig{
Name: "parent",
Limits: createLimitMaxResources(
map[string]map[string]string{
"*": {"memory": "50"},
},
nil),
Queues: []QueueConfig{
{
Name: "child1",
Limits: createLimitMaxResources(
map[string]map[string]string{
"user1":
{"memory": "25"},
},
nil),
Queues: []QueueConfig{
{
Name: "child2",
Limits:
createLimitMaxResources(
map[string]map[string]string{
"user2": {"memory": "75"},
},
nil),
},
},
},
},
},
hasError: true,
},
Also, Are doing hierarchical comparison checks for wildcard user and group
similar to named users and groups? I doubt this.
--
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]