-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fix nvme block resize #366
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.
Did the test that you mentioned fail prior to this fix? Is it a cert-csi test that was added or was it always failing?
nvmeControllerDevice, err := s.Fs.GetUtil().GetNVMeController(deviceName) | ||
if err != nil { | ||
log.Errorf("Failed to rescan device (%s) with error (%s)", deviceName, err.Error()) | ||
return nil, status.Error(codes.Internal, err.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.
Why would the GetNVMeController() call fail? Is bailing out the proper handling? Could anything else be done? The error message is inaccurate and can cause problems during troubleshooting. Is it better to indicate that there was a failure to get the device controller?
log.Errorf("Failed to rescan device (%s) with error (%s)", deviceName, err.Error()) | ||
return nil, status.Error(codes.Internal, err.Error()) | ||
} | ||
if nvmeControllerDevice != "" { |
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.
So there seems to be a place where nvmeControllerDevice can be empty but GetNVMeController() returns no error. Is this code still then correct?
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.
For PowerMax, we have two devices: nvme0c0n1 and nvme0n1.
Here, nvme0c0n1 is a controller, but nvme0n1 is not.
The GetNVMeController function processes each device as follows:
- nvme0c0n1 - Successfully returns the controller nvme0.
- nvme0n1 - print logger
Not a valid nvme controller device: nvme0n1
and return empty nvmeControllerDevice
The cert-csi test for block volume expansion was present, but it was giving false positive results. It only expanded the volume without actually validating if the expansion was successful. We've now added a check to wait for successful volume expansion events, ensuring that the volume has been properly expanded before considering the test a success. |
Description
Fix nvme block resize.
GitHub Issues
List the GitHub issues impacted by this PR:
Checklist:
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration