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
Add separate cache for CSINode #80084
Conversation
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.
/ok-to-test
This is work-in-progress, but could you provide early feedback on the mechanism used here to prevent the issues we discussed in #79416? In summary, this PR decouples the lifecycle of I believe the main change we should look at at this point is in the file cache.go: https://github.com/kubernetes/kubernetes/pull/80084/files#diff-f4a894ca5e905aa5f613269fc967fe2c |
@@ -574,6 +574,7 @@ func (c *configFactory) getPluginArgs() (*PluginFactoryArgs, error) { | |||
NodeLister: &nodeLister{c.nodeLister}, | |||
PDBLister: c.pdbLister, | |||
NodeInfo: c.schedulerCache, | |||
CSINodeInfo: c.schedulerCache, |
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.
Initially I re-used the NodeInfo
interface above by adding a new GetCSINodeInfo()
method to it. However, the patch got fairly bigger because the NodeInfo
interface is used in many places in k8s.
/test pull-kubernetes-verify |
a6ae084
to
d18c75f
Compare
/test pull-kubernetes-bazel-test |
|
||
csiNode, err := c.csiNodeInfo.GetCSINodeInfo(node.Name) | ||
if err != nil { | ||
klog.V(5).Infof("Could not get a CSINode object for the node: %v", err) |
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.
This is possible for older nodes?
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.
Yes, nodes where for some reason there's no CSINode
. On second thought, I think we want to return the error and prevent scheduling the pod (recording the error in the events).
9049a56
to
0ee6e2b
Compare
/test pull-kubernetes-node-e2e-containerd |
2da5623
to
c0648bd
Compare
/test pull-kubernetes-kubemark-e2e-gce-big |
/lgtm |
c0648bd
to
c5d9af2
Compare
/test pull-kubernetes-e2e-gce-device-plugin-gpu |
@msau42, lost your lgtm because this PR needed rebase. |
/lgtm |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bertinatto, bsalamat 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 Review the full test history for this PR. Silence the bot with an |
/retest |
/test pull-kubernetes-integration
|
/retest |
@bertinatto: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
With this PR committed, is schedulerCache#csiNodes still needed ? |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Sparkled from the discussion in #79416 (comment), this PR introduces a new structure to store cached
CSINode
objects in the scheduler.Does this PR introduce a user-facing change?: