Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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:
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) {
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