Skip to content
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

change enqueue to optional action #2309

Merged
merged 2 commits into from
Jul 4, 2022
Merged

change enqueue to optional action #2309

merged 2 commits into from
Jul 4, 2022

Conversation

wpeng102
Copy link
Member

Signed-off-by: wpeng102 [email protected]

The enqueue action is a mandatory action right now. It would be wonderful to make it optional and configurable.
Firstly the integration code with other community will be more simple and easy.
Secondly the other actions no need to depend on enqueue . All the actions are decoupled.

#2040

If not config Enqueue action, scheduler will change the Pending pg to Inqueue at closesession.

@volcano-sh-bot volcano-sh-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 25, 2022
@@ -13,6 +13,8 @@ import (
"volcano.sh/volcano/pkg/scheduler/api"
)

var EnqueueExist bool
Copy link
Contributor

@Thor-wl Thor-wl Jun 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly to ask about the reason why hard code enqueue action to make the judgement?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introduce ActionMap to store which action is configured by customer.

@wpeng102
Copy link
Member Author

Backgroud:
Some customers wants volcano do not block pod created when resource is insufficient, just keep same behavior as default scheduler.

@@ -16,6 +16,9 @@ limitations under the License.

package conf

// ActionMap check if a action exist in scheduler configmap
var ActionMap map[string]bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe ExistActionMap is better?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EnabledActionMap is better

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK about that.

@@ -98,6 +99,10 @@ func (ju *jobUpdater) updateJob(index int) {
job := ju.jobQueue[index]
ssn := ju.ssn

if !conf.EnabledActionMap["enqueue"] && job.PodGroup.Status.Phase == scheduling.PodGroupPending {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add comments here or extract a small func for this special treatment

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add comments for this block

@william-wang
Copy link
Member

william-wang commented Jun 27, 2022

Any e2e for scheduler configuration without enqueue?

@volcano-sh-bot volcano-sh-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 29, 2022
@wpeng102
Copy link
Member Author

Any e2e for scheduler configuration without enqueue?

Add e2e case

…configmap and add E2E

Signed-off-by: wpeng102 <[email protected]>

Signed-off-by: wpeng102 <[email protected]>

Signed-off-by: wpeng102 <[email protected]>

Signed-off-by: wpeng102 <[email protected]>

Signed-off-by: wpeng102 <[email protected]>

Signed-off-by: wpeng102 <[email protected]>

Signed-off-by: wpeng102 <[email protected]>

Signed-off-by: wpeng102 <[email protected]>

Signed-off-by: wpeng102 <[email protected]>

Signed-off-by: wpeng102 <[email protected]>

Signed-off-by: wpeng102 <[email protected]>
Copy link
Member

@william-wang william-wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 4, 2022
@Thor-wl
Copy link
Contributor

Thor-wl commented Jul 4, 2022

/approve

@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Thor-wl

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 4, 2022
@volcano-sh-bot volcano-sh-bot merged commit 150b791 into volcano-sh:master Jul 4, 2022
@wpeng102 wpeng102 deleted the fix branch July 7, 2022 03:00
william-wang pushed a commit that referenced this pull request Aug 1, 2022
change enqueue to optional action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants