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 node not found errors #584

Merged
merged 1 commit into from
Dec 4, 2019
Merged

Conversation

davidstack
Copy link
Contributor

@davidstack davidstack commented Dec 4, 2019

bugreport:
after remove one node from k8s cluster, when schedule new pod use kube-batch/volcano ,pod may be failed to scheule with this error

> I1203 02:43:04.686751       1 predicates.go:244] Pod Affinity/Anti-Affinity predicates Task <4e5f39da-cef3-43f5-b839-69dd52276555/2qac8qjsqsl09-0> on Node <node2>: fit false, err Failed to get all terms that pod 4e5f39da-cef3-43f5-b839-69dd52276555/2qac8qjsqsl09-0 matches, err: failed to find node <node3>
W1203 02:43:04.686772       1 scheduler_helper.go:80] Predicates failed for task <4e5f39da-cef3-43f5-b839-69dd52276555/2qac8qjsqsl09-0> on node <node2>: Failed to get all terms that pod 4e5f39da-cef3-43f5-b839-69dd52276555/2qac8qjsqsl09-0 matches, err: failed to find node <node3>

the GetNodeInfo in file /pkg/scheduler/plugins/util/util.go and pkg/scheduler/plugins/nodeorder/noderorder.go shoud change node not found errors to kubernetes's node not found error,like this
errors.NewNotFound(v1.Resource("node"), name)

this function is called by k8s code (InterPodAffinityMatches function )when check pod Affinity.
in k8s function getMatchingAntiAffinityTopologyPairsOfPods,it will ignore node that not exist.

if err != nil {
			if apierrors.IsNotFound(err) {
				klog.Errorf("Node not found, %v", existingPod.Spec.NodeName)
				continue
			}
			return nil, err
		}

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

Travis tests have failed

Hey @davidstack,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

TravisBuddy Request Identifier: e1301f10-1630-11ea-81b2-273600e26419

@k82cn
Copy link
Member

k82cn commented Dec 4, 2019

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

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

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 4, 2019
@volcano-sh-bot volcano-sh-bot removed the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2019
@davidstack
Copy link
Contributor Author

change three commits to one commit

@k82cn
Copy link
Member

k82cn commented Dec 4, 2019

/lgtm

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

k82cn commented Dec 4, 2019

thanks very much for the contribution!

@TravisBuddy
Copy link

Hey @davidstack,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 47b4eac0-1638-11ea-81b2-273600e26419

@TravisBuddy
Copy link

Hey @davidstack,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 3e2301d0-1639-11ea-81b2-273600e26419

@volcano-sh-bot volcano-sh-bot merged commit 92bf4be into volcano-sh:master Dec 4, 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