[ 
https://issues.apache.org/jira/browse/YUNIKORN-2688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17864038#comment-17864038
 ] 

Wilfred Spiegelenburg commented on YUNIKORN-2688:
-------------------------------------------------

With the use of the placement rules always we should already do most of this:
 * if the queue is not found and cannot be created by the rule no queue name is 
returned and the next rule is checked
 * managed queues (via the config) get their state reset after YUNIKORN-2527 
when added back
 * dynamic queues get cleaned up regardless of their state

For a dynamic queue to be marked as _draining_ a configured parent of that 
dynamic queue must be removed. That case needs extra work in YUNIKORN-2689

We need to check in the AppPlacementManager.PlaceApplication() method in for 
the queue state. like we do for the submit access of the user. We should also 
cleanup and dedupe the submit access check in that method.

Would be good to get this in for 1.6 inline with the changes for the default 
queue from YUNIKORN-2703 and YUNIKORN-2711

> new applications get placed in draining queue
> ---------------------------------------------
>
>                 Key: YUNIKORN-2688
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-2688
>             Project: Apache YuniKorn
>          Issue Type: Bug
>          Components: core - scheduler
>            Reporter: Hengzhe Guo
>            Assignee: Hengzhe Guo
>            Priority: Major
>
> The status of the queue isn't checked when placing new applications. We saw a 
> case where new applications keep getting submitted to a draining queue and 
> the queue can't be really deleted for days. 
> a unit test can confirm:
> {code:java}
> diff --git a/pkg/scheduler/placement/placement_test.go 
> b/pkg/scheduler/placement/placement_test.go
> index 14fe6ac..4f53e0b 100644
> --- a/pkg/scheduler/placement/placement_test.go
> +++ b/pkg/scheduler/placement/placement_test.go
> @@ -294,6 +294,20 @@ partitions:
>         if err == nil || queueName != "" {
>                 t.Errorf("parent queue: app should not have been placed, 
> queue: '%s', error: %v", queueName, err)
>         }
> +
> +       // user rule existing queue, the queue is draining
> +       tags = make(map[string]string)
> +       user = security.UserGroup{
> +               User:   "testchild",
> +               Groups: []string{},
> +       }
> +       app = newApplication("app1", "default", "", user, tags, nil, "")
> +       queueFunc("root.testparent.testchild").MarkQueueForRemoval()
> +       err = man.PlaceApplication(app)
> +       queueName = app.GetQueuePath()
> +       if err == nil || queueName != "" {
> +               t.Errorf("draining queue: app should not have been placed, 
> queue: '%s', error: %v", queueName, err)
> +       }
>  } func TestForcePlaceApp(t *testing.T) { {code}
> For a queue not creatable, we should expect the app to be rejected.
> For a queue creatable, we should expect the queue to be transitioned back to 
> active state, which is blocked by 
> [YUNIKORN-2689|https://issues.apache.org/jira/browse/YUNIKORN-2689]



--
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