-
Notifications
You must be signed in to change notification settings - Fork 26
UB-1475: returning the actual error from the Discover instead of masking it as Volume not found #236
UB-1475: returning the actual error from the Discover instead of masking it as Volume not found #236
Conversation
…ing it as Volume not found
remote/mounter/block_device_utils/mpath.go, line 137 at r1 (raw file):
Extra spaces? |
remote/mounter/block_device_utils/mpath.go, line 259 at r1 (raw file):
Don't you want to rename this as well? (To start with capital 'C') |
remote/mounter/block_device_utils/mpath.go, line 127 at r1 (raw file):
remove this empty line |
remote/mounter/block_device_utils/block_device_utils_test.go, line 207 at r1 (raw file):
No need for new line here. |
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.
Reviewed 5 of 5 files at r1.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @olgashtivelman and @shay-berman)
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.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @beckmani, @olgashtivelman, and @shay-berman)
remote/mounter/block_device_utils/block_device_utils_test.go, line 207 at r1 (raw file):
Previously, beckmani (Isaac Beckman) wrote…
No need for new line here.
Done.
remote/mounter/block_device_utils/mpath.go, line 127 at r1 (raw file):
Previously, beckmani (Isaac Beckman) wrote…
remove this empty line
Done.
remote/mounter/block_device_utils/mpath.go, line 137 at r1 (raw file):
Previously, beckmani (Isaac Beckman) wrote…
Extra spaces?
Done.
remote/mounter/block_device_utils/mpath.go, line 259 at r1 (raw file):
Previously, beckmani (Isaac Beckman) wrote…
Don't you want to rename this as well? (To start with capital 'C')
I change the CommandExecuteError, because that was the one I used. there are many other errors in the code that are in small letters (and cannot be exported) , I think we can change this one when we will need to.
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.
Reviewed 2 of 2 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @shay-berman)
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.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @shay-berman)
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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @olgashtivelman)
remote/mounter/block_device_utils/block_device_utils_test.go, line 199 at r2 (raw file):
Expect(err).To(HaveOccurred()) }) FIt("should return actual error when sg_inq command fails", func() {
Olga, please remove the FIt and put It instead. So it will not run only this unit test all the time.
remote/mounter/block_device_utils/mpath.go, line 136 at r2 (raw file):
wwn, err := b.GetWwnByScsiInq(mpathFullPath) if err != nil { return "", b.logger.ErrorRet(&VolumeNotFoundError{volumeWwn}, "failed")
are you sure its better for you to move the identification of the error to the upper level?
could you please specific the ubiqutiy-k8s PR that will do that instead?
This PR will return the actual error that is returned from sg_inq and not mask it as a volume not found error .
this is important because if we mask the error from sg_inq we might stumble into an idempotent case and continue the umount even thought we should not and we will be stuck.
(this can happen when there is a faulty device so sg_inq returns an error and we return a volume not found error in this case, and after that because we know to continue with the unmount in case of a volume not found we will continue the umount even though other steps did not happen and this is not really the case of a volume not found because it was already unmounted.)
This change is