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 Statement unevict method to call UpdateTask #581

Merged
merged 1 commit into from
Dec 3, 2019

Conversation

yodarshafrir1
Copy link
Contributor

What this PR does / why we need it:
This change ensures that when unevict is called the value of nodeInfo.Releasing will be updated as if the task was evicted.

Before this fix, because the task exists on the current nodeInfo, every time unevict is called the Releasing value of the nodeInfo isn't updated and the value remains same as if the task was evicted

Why does it happen:
This happens because unevict calls AddTask:

// Update task in node.
if node, found := s.ssn.Nodes[reclaimee.NodeName]; found {
     node.AddTask(reclaimee)
} 

AddTask will throw an error because this task already exists under the current nodeInfo and therefore will not update the Releasing field as if the current task is Running

Issue: #907
This fix was added to kube-batch: kubernetes-retired/kube-batch#912

…ask. This is needed in order to 'undo' the changes that were created during the call to 'evict' method (currently the node.Releasing value is wrong and will have the value as if the job was evicted, even if 'unevict' was called). When AddTask is called an error is returned because the task already exists in this node, and the Releasing value isn't set to the right value as if the job was never evicted.
@volcano-sh-bot
Copy link
Contributor

Welcome @yodarshafrir1!

It looks like this is your first PR to volcano-sh/volcano 馃帀.

Thank you, and welcome to Volcano. 😃

@volcano-sh-bot volcano-sh-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 2, 2019
@yodarshafrir1
Copy link
Contributor Author

/assign @k82cn

@TravisBuddy
Copy link

Hey @yodarshafrir1,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: c3fc1390-1522-11ea-a5d4-6b7b0fca08ad

@k82cn
Copy link
Member

k82cn commented Dec 3, 2019

/lgtm
/approve

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 3, 2019
@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: k82cn, yodarshafrir1

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 Dec 3, 2019
@TravisBuddy
Copy link

Hey @yodarshafrir1,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 00e1edd0-1568-11ea-a5d4-6b7b0fca08ad

@volcano-sh-bot volcano-sh-bot merged commit 1a30faa into volcano-sh:master Dec 3, 2019
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.

4 participants