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

Supports rollback when allocate callback function fails #3776

Merged

Conversation

wangyang0616
Copy link
Member

@wangyang0616 wangyang0616 commented Oct 16, 2024

fix issue #3777 for task 1

… executed, for example, in the GPU allocation scenario

Signed-off-by: wangyang0616 <wangyang8126@gmail.com>
@volcano-sh-bot volcano-sh-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 16, 2024
@volcano-sh-bot volcano-sh-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 16, 2024
@wangyang0616 wangyang0616 changed the title [WIP]Supports rollback when allocate callback function fails Supports rollback when allocate callback function fails Oct 16, 2024
@volcano-sh-bot volcano-sh-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 16, 2024
Signed-off-by: wangyang <wangyang8126@gmail.com>
}
}
return fmt.Errorf("Failed to exec allocate callback functions")
}
}
Copy link
Member

Choose a reason for hiding this comment

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

How about aggregate errs and call unallocate func when there is err?

Copy link
Member Author

@wangyang0616 wangyang0616 Oct 16, 2024

Choose a reason for hiding this comment

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

When each pod allocation is successful, but the overall vcjob does not meet expectations, unallocate is used to roll back the previous resource scheduling information.

For direct resource errors and exceptions during the scheduling process, I understand that it would be more appropriate to roll back directly based on the error.

Signed-off-by: wangyang0616 <wangyang8126@gmail.com>
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 Oct 17, 2024
@volcano-sh-bot
Copy link
Contributor

[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 /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 Oct 17, 2024
@volcano-sh-bot volcano-sh-bot merged commit 112dafd into volcano-sh:release-1.9 Oct 17, 2024
10 checks passed
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants