[ 
https://issues.apache.org/jira/browse/YUNIKORN-2273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated YUNIKORN-2273:
-------------------------------------
    Labels: pull-request-available  (was: )

> checkLimitMaxApplications fails if there is missing limit in a middle queue
> ---------------------------------------------------------------------------
>
>                 Key: YUNIKORN-2273
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-2273
>             Project: Apache YuniKorn
>          Issue Type: Bug
>          Components: core - common
>            Reporter: PoAn Yang
>            Assignee: PoAn Yang
>            Priority: Major
>              Labels: pull-request-available
>
> The checkLimitMaxApplications function rejects config which child limit is 
> large than parent limit. However, it doesn't cover all cases like child limit 
> is large than grandparent limit. Following is my test case:
> {noformat}
> func TestCheckLimitMaxApplicationsGrandLevel(t *testing.T) {
>     err := checkLimitMaxApplications(
>         QueueConfig{
>             Name: "root",
>             Limits: []Limit{
>                 {
>                     Limit:           "user1",
>                     Users:           []string{"user1"},
>                     MaxApplications: 100,
>                 },
>                 {
>                     Limit:           "user2",
>                     Users:           []string{"user2"},
>                     MaxApplications: 100,
>                 },
>             },
>             Queues: []QueueConfig{
>                 {
>                     Name: "parent",
>                     Limits: []Limit{
>                         {
>                             Limit:           "user1",
>                             Users:           []string{"user1"},
>                             MaxApplications: 50,
>                         },
>                     },
>                     Queues: []QueueConfig{
>                         {
>                             Name: "child",
>                             Limits: []Limit{
>                                 {
>                                     Limit:           "user1",
>                                     Users:           []string{"user1"},
>                                     MaxApplications: 10,
>                                 },
>                                 {
>                                     Limit:           "user2",
>                                     Users:           []string{"user2"},
>                                     MaxApplications: 150,
>                                 },
>                             },
>                         },
>                     },
>                 },
>             },
>         },
>         make(map[string]map[string]uint64),
>         make(map[string]map[string]uint64),
>         common.Empty,
>     )
>     assert.Equal(t, err != nil, true, "user2 cpu maxapplications in 
> root.parent.child should not be large than root") // this will fail
> }{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@yunikorn.apache.org
For additional commands, e-mail: issues-h...@yunikorn.apache.org

Reply via email to