-
Notifications
You must be signed in to change notification settings - Fork 30
Sumit/csi 5841 #846
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
base: release-1.13.1
Are you sure you want to change the base?
Sumit/csi 5841 #846
Changes from 4 commits
e2391a6
1f0fd1b
cd44bb6
d664aa5
013ca59
b9abbcf
c706a20
ec6491d
a8ac5c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -389,13 +389,22 @@ func (d *NodeService) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstag | |
| return nil, status.Error(codes.Internal, err.Error()) | ||
| } | ||
|
|
||
| err = d.OsDeviceConnectivityHelper.FlushMultipathDevice(baseDevice) | ||
| isNvme, err := d.NodeUtils.IsNvmeBaseDevice(baseDevice) | ||
| if err != nil { | ||
| return nil, status.Errorf(codes.Internal, "Multipath -f command failed with error: %v", err) | ||
| logger.Warningf("Failed to check if device %s is NVMe, assuming non-NVMe: %v", baseDevice, err) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is... a problem. But I'm not sure there's a better way. |
||
| isNvme = false | ||
| } | ||
| err = d.OsDeviceConnectivityHelper.RemovePhysicalDevice(sysDevices) | ||
| if err != nil { | ||
| return nil, status.Errorf(codes.Internal, "Remove scsi device failed with error: %v", err) | ||
| if !isNvme { | ||
| err = d.OsDeviceConnectivityHelper.FlushMultipathDevice(baseDevice) | ||
| if err != nil { | ||
| return nil, status.Errorf(codes.Internal, "Multipath -f command failed with error: %v", err) | ||
| } | ||
| err = d.OsDeviceConnectivityHelper.RemovePhysicalDevice(sysDevices) | ||
| if err != nil { | ||
| return nil, status.Errorf(codes.Internal, "Remove scsi device failed with error: %v", err) | ||
| } | ||
| } else { | ||
| logger.Infof("Device %s is NVMe: skipping multipath -f and SCSI device cleanup", baseDevice) | ||
| } | ||
|
|
||
| stageInfoPath := path.Join(stagingTargetPath, StageInfoFilename) | ||
|
|
||
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.
I see the logic was: Run multipathd, if it fails (returns with error) - exit immediately with the error. Otherwise: check if the output contains contains the volumeIdVariation. If it does - exit. If not - sleep for intervalSeconds and retry - for maxRetries.
The logic after your change is: run multipathd. If it fails - sleep and retry. Otherwise - same as above, return if found the volumeIdVariation or else retry.
That's a change of the logic. Why?... Who says we want to retry in case of multipathd error?