-
Notifications
You must be signed in to change notification settings - Fork 177
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
vanilla: return volume path as part of ListVolumes response for migrated in-tree volumes #2558
vanilla: return volume path as part of ListVolumes response for migrated in-tree volumes #2558
Conversation
Hi @adikul30. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
8555084
to
1e97f04
Compare
1e97f04
to
3ff7775
Compare
|
3ff7775
to
1010b98
Compare
5fdc404
to
8fb07ec
Compare
8fb07ec
to
b97cacd
Compare
/ok-to-test |
eb124da
to
c8ada38
Compare
Started Vanilla block pre-checkin pipeline... Build Number: 2439 |
|
volumeId := blockVolID | ||
migratedVolumePath, err := volumeMigrationService.GetVolumePath(ctx, blockVolID, false) | ||
if err != nil { | ||
log.Errorf("failed to get volumePath for migrated volume. err: %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.
If GetVolumePath
fails for a migrated volume, we just log an error and proceed with line: 2655. Don't we have to return error
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.
With the modified GetVolumePath method (passing a flag to only check the in-memory cache to see if it's an in-tree volume), we are simply going through a map and returning true or false. No error is returned.
So, I'm not expecting the control to reach this line unless something weird like volumeMigrationService
is not initialized. Are you referring to such an error?
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.
Based on Divyen's above comment, I am changing the method to return ErrNotFound
when we don't get a cache hit. But I still don't expect an error other than that one. Can you confirm if we should return an error in ListVolumes response if we get an error other than ErrNotFound
?
415401a
to
877941c
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.
/approve
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.
Few comments
877941c
to
d9204b7
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.
Have few minor comments after the latest commit.
Overall, code changes look good to me
/approve
d9204b7
to
86dd9ca
Compare
86dd9ca
to
e71408e
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adikul30, chethanv28, divyenpatel 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 |
…related to AttachVolumes and also the nodes cache fix during attach/detach. (#2561) * Determine cluster distribution server version & type using kubernetes API server version (#2404) * Determine cluster distribution server version & type using kubernetes API server version * Exit the container if we are not able to fetch the k8s client * break the loop as soon as we find the distribution type * skip adding node to cache during attach or detach operation (#2546) * Return volume path as part of ListVolumes response for migrated volumes (#2558) --------- Co-authored-by: Divyen Patel <divyenp@vmware.com> Co-authored-by: Aditya Kulkarni <adkulkarni@vmware.com>
What this PR does / why we need it:
ListVolumes
call returnsvolumeID
tonodeID
mapping even in case of migrated in-tree volumes. In case of migrated volumes, external-attacher will look for the initialvolumePath
in the ListVolumes response. Since vSphere CSI Driver's ListVolumes response doesn't emit the volumePath for migrated volumes, external-attacher continuously makesAttachVolume
calls to CSI and the VC UI gets filled with AttachVolume tasks.Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged):fixes #2534
Testing done:
Manual
#2558 (comment)
block vanilla precheckin
vcp to csi
Special notes for your reviewer:
Release note: