-
Notifications
You must be signed in to change notification settings - Fork 994
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 queue controller about state #512
Conversation
Travis tests have failedHey @sivanzcw, TravisBuddy Request Identifier: 36a202a0-00b1-11ea-8767-d53e6939ac53 |
Hey @sivanzcw, TravisBuddy Request Identifier: 1c950e20-010b-11ea-82f1-cf3ba55cf6d0 |
708fa42
to
7e2d464
Compare
Hey @sivanzcw, TravisBuddy Request Identifier: ec1c7e20-0116-11ea-82f1-cf3ba55cf6d0 |
Hey @sivanzcw, TravisBuddy Request Identifier: ae5bf880-0117-11ea-82f1-cf3ba55cf6d0 |
Hey @sivanzcw, TravisBuddy Request Identifier: 17967800-0485-11ea-b305-a56282dbf54c |
/retest |
@sivanzcw: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
// of the queue will be set as `Closing`, while if there is no podgroup under the queue, | ||
// the status of queue will be set as `Stopped`. | ||
queueStatus.State = queue.Spec.State | ||
if len(queueStatus.State) == 0 { |
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.
why still update state here?
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.
For condition of podgroups under the queue will affect the state of the queue, it may determine whether the queue is in the Closed
state or the Closing
state, when desired state of queue is Closed
. So during synchronizing queue, we need to refresh the true state
of queue. True state
of queue is state
in status
. state
in spec
only defines the desired state of queue. The code still follows the logic that state
of spec
and condition of podgroup under the queue determine the true state
of queue, so here to get the true state of the queue according to the state
of spec
.
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.
the queue's state should be update by each State
, and queue.Satatus.State
should only copy it.
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.
updated it
case *busv1alpha1.Command: | ||
cmd := obj.(*busv1alpha1.Command) | ||
if cmd.TargetObject != nil && | ||
cmd.TargetObject.APIVersion == schedulingv1alpha2.SchemeGroupVersion.String() && |
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.
let's create QueueKind
in apis package and use DeepEqual here.
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.
Since the TargetObject
is an instantiated object that contains the name
and uid
of queue reference, it is difficult to use the DeepEqual
function to compare it with a constant with QueueKind
type. A filter function is provided to replace the filtering action here.
Hey @sivanzcw, TravisBuddy Request Identifier: cb2d09b0-0abb-11ea-adc5-254fad528e65 |
Hey @sivanzcw, TravisBuddy Request Identifier: 2b5ed2b0-0ae3-11ea-adc5-254fad528e65 |
Hey @sivanzcw, TravisBuddy Request Identifier: d7b576e0-175e-11ea-b5b2-a33d2660b61c |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: k82cn, sivanzcw 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 |
we need add command line to open/close queue for this :) |
add it #590 |
Add queue action and events
Add filter function for command watch in
job controller
, only list command whose target isbatch.volcano.sh/v1alpha1 Job
Add events recorder for queue controller
Add command sync during queue sync
Change queue sync logic, sync queue according to its events and action