-
Notifications
You must be signed in to change notification settings - Fork 953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add allocated field in queue status to indicate used resources in queue. #2592
Add allocated field in queue status to indicate used resources in queue. #2592
Conversation
293f3ea
to
69c3cc8
Compare
f97d8bf
to
93afc6b
Compare
3dc607c
to
f32b7e9
Compare
74d6c40
to
4a8bc9e
Compare
test/e2e/util/queue.go
Outdated
@@ -52,6 +52,9 @@ func CreateQueueWithQueueSpec(ctx *TestContext, queueSpec *QueueSpec) { | |||
_, err := ctx.Vcclient.SchedulingV1beta1().Queues().Create(context.TODO(), queue, metav1.CreateOptions{}) | |||
Expect(err).NotTo(HaveOccurred(), "failed to create queue %s", queueSpec.Name) | |||
} | |||
|
|||
// wait for queue state turns to be open | |||
time.Sleep(5 * time.Second) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We ever spent lot's effort to shortage the ci running time, please eveluate the sleep duration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reduced to 3 seconds. Less waiting time would cause queue status not initialized and not Open
, thus failed to apply job to the nil
state queue.
@@ -189,6 +191,34 @@ func closeSession(ssn *Session) { | |||
ju := newJobUpdater(ssn) | |||
ju.UpdateAll() | |||
|
|||
// calculate allocated resources on each queue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make new function to update queue status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make new function to update queue status.
A new function updateQueueStatus()
was abstracted.
4a8bc9e
to
83312e4
Compare
83312e4
to
780c826
Compare
Signed-off-by: jiangkaihua <jiangkaihua1@huawei.com>
Signed-off-by: jiangkaihua <jiangkaihua1@huawei.com>
Signed-off-by: jiangkaihua <jiangkaihua1@huawei.com>
Signed-off-by: jiangkaihua <jiangkaihua1@huawei.com>
44c7fec
to
a1cecb4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: william-wang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[Cherry-pick] Add allocated field in queue status to indicate used resources in queue. #2592
#2571