-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Delay CSI client initialization #74652
Conversation
/retest |
/test pull-kubernetes-e2e-gce-csi-serial |
/test pull-kubernetes-e2e-gce |
/test pull-kubernetes-e2e-gce-csi-serial |
This PR should work with #74653 to fix |
I noticed that the skip attach check is also called early. Would this have any problem during reconstruction? I guess during reconstruction we only call mount/unmount/map/unmap. And this attachable check will end up failing later during reconciliation. |
cc @jsafrane to think about the skip attach case when the driver/kubelet restarts and is the driver is not available by the time VolumesAreAttached/WaitForAttach is called. |
Maybe skip attach is ok because it doesn't call the csi driver, it gets the K8s api object. |
At before, If it succeeds reconstructing CSI volume information from the host, CSI volumes will be put into the actual and desired state of the world. After this, reconciliation main loop may still fail because CSI driver CRD is not synced or CSI driver client is not discovered by plugin watcher yet. But the difference is it will retry again now. When CSI driver CRD is synced and CSI client is discovered, the operation will succeed. |
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cofyc, msau42, saad-ali 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 |
/test pull-kubernetes-e2e-gce-csi-serial |
/lgtm |
if c.csiClient != nil { | ||
return c.csiClient, nil | ||
} | ||
csi, err := newCsiDriverClient(c.driverName) |
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.
Can c.csiClient be assigned directly (we have the write lock) ?
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.
you mean c.csiClient, err := newCsiDriverClient(c.driverName)
?
Yes, it is equal, no much difference.
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.
there is one difference, with the second style newCsiDriverClient(c.driverName)
must return nil client on error, with the first style we do not need make such assumption.
…upstream-release-1.13 Automated cherry pick of #74652: Delay CSI client initialization
What type of PR is this?
What this PR does / why we need it:
#72500 (comment)
Which issue(s) this PR fixes:
Fixes #72500
Special notes for your reviewer:
Does this PR introduce a user-facing change?: