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
Enhance ErrReasonPVNotExist in volumebinding scheduler plugin #105196
Enhance ErrReasonPVNotExist in volumebinding scheduler plugin #105196
Conversation
@yibozhuang: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Welcome @yibozhuang! |
Hi @yibozhuang. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
/assign @saad-ali |
The fix to correctly attribute the count to nodes rather than PVCs looks good. /lgtm |
// ErrReasonPVNotExist is used when a PVC can't find the bound persistent volumes" | ||
ErrReasonPVNotExist = "pvc(s) bound to non-existent pv(s)" | ||
// ErrReasonPVNotExist is used when a pod has PVC(s) but can't find the bound persistent volume(s)" | ||
ErrReasonPVNotExist = "node(s) due to pvc(s) bound to non-existent pv(s)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this a pod level error, not a node level one? like all nodes would not be eligible if the pod's PVC was bound to non-existent PV.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right but FindPodVolumes is invoked for all nodes and the number of not available ones would be accumulated because every node would not be eligible since the PV is not found.
This change just cleans up the message to indicate that the node is not selected due to this reason.
The previous message of something like:
0/2 nodes are available: 2 pvc(s) bound to non-existent pv(s)
can be confusing since its not 2 PVCs bound to non-existent PVs, but rather 2 nodes not available to be scheduled due to pod's PVC(s) bound to non-existent PV(s).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about?
ErrReasonPVNotExist = "node(s) due to pvc(s) bound to non-existent pv(s)" | |
ErrReasonPVNotExist = "node(s) unavailable due to one or more pvc(s) bound to non-existent pv(s)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, updated
// ErrReasonPVNotExist is used when a PVC can't find the bound persistent volumes" | ||
ErrReasonPVNotExist = "pvc(s) bound to non-existent pv(s)" | ||
// ErrReasonPVNotExist is used when a pod has PVC(s) but can't find the bound persistent volume(s)" | ||
ErrReasonPVNotExist = "node(s) due to pvc(s) bound to non-existent pv(s)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about?
ErrReasonPVNotExist = "node(s) due to pvc(s) bound to non-existent pv(s)" | |
ErrReasonPVNotExist = "node(s) unavailable due to one or more pvc(s) bound to non-existent pv(s)" |
ecdf96b
to
eb5bbdd
Compare
This change will make the message more clear when there is a case of PVC(s) bound to PV(s) that no longer exists and scheduler does not select the node due to this issue. Previous error message would look like: 0/2 nodes are available: 2 pvc(s) bound to non-existent pv(s) Updated message looks like: 0/2 nodes are available: 2 node(s) unavailable due to one or more pvc(s) bound to non-existent pv(s) For larger clusters with many different reasons of nodes that are not available, the current message can be very misleading for users to think that there are many PVCs lost due to PVs deleted but in fact it could be just a single PVC case but many nodes not selected by the scheduler due to this case. Signed-off By: Yibo Zhuang <yibzhuang@gmail.com>
eb5bbdd
to
603a4e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: saad-ali, yibozhuang 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 |
/retest |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This change will make the message more clear when there
is a case of PVC(s) bound to PV(s) that no longer exists
and scheduler does not select the node due to this issue.
Without this change, the
FailedScheduling
error message would look like:With this change, the message would look like:
For larger clusters with many different reasons of nodes that
are not available, the current message can be very misleading for
users to think that there are many PVCs lost due to PVs deleted but
in fact it could be just a single PVC case but many nodes not selected
by the scheduler due to this case.
Signed-off By: Yibo Zhuang yibzhuang@gmail.com
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: