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

The allocate phase only updates the podgroup in the pending state to the inqueue state #2658

Merged

Conversation

wangyang0616
Copy link
Member

Signed-off-by: wangyang [email protected]

fix: #2657

…dates the podgroup in the pending state to the inqueue state

Signed-off-by: wangyang <[email protected]>
@volcano-sh-bot volcano-sh-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 28, 2023
@@ -61,7 +61,7 @@ func (alloc *Action) Execute(ssn *framework.Session) {

for _, job := range ssn.Jobs {
// If not config enqueue action, change Pending pg into Inqueue statue to avoid blocking job scheduling.
if !conf.EnabledActionMap["enqueue"] {
if !conf.EnabledActionMap["enqueue"] && job.IsPending() {
Copy link
Contributor

@Thor-wl Thor-wl Jan 29, 2023

Choose a reason for hiding this comment

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

It's LGTM generally. Some kind suggestions are as follows:

  1. If this patch is in use, suggest to refactor the else section like this: else if job.IsPending(), which may be more readable and clean.
  2. IMO, a more reasonable way is to filter podgroups which are not at completed status at the stage of snapshot. If that, only podgroups, which are to be allocated resources, will enter the session. Besides, it will improve the performance.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for your suggestion, the first question has been optimized.

There are still some doubts about the second question. The function implemented here is to prevent the job in the pending state from blocking when the enqueue action is not configured, so the processing logic for updating the pending job to the inqueue state is added.

However, before the update, the status of the job was not judged, but all status jobs were updated to inqueue (including running, unknown, and completed). This kind of processing did not meet the original intention, and also caused the problem recorded in the issue.

I understand that by correcting this, the problem in the issue should be solved first. For the filtering of the job in the completed state, can it not be processed for the time being?

Copy link
Contributor

Choose a reason for hiding this comment

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

I got you. Before reviewing this PR, I've looked through the related issue. If available, can you help for the filter in the later PR?

@wangyang0616
Copy link
Member Author

/retest

@Thor-wl
Copy link
Contributor

Thor-wl commented Jan 31, 2023

/approve
/lgtm

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 31, 2023
@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 Jan 31, 2023
@Thor-wl Thor-wl requested review from shinytang6 and william-wang and removed request for merryzhou and zen-xu January 31, 2023 05:51
@volcano-sh-bot volcano-sh-bot merged commit a53b724 into volcano-sh:master Jan 31, 2023
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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The completed status of the podgroup will be updated to the inqueue status
3 participants