-
Notifications
You must be signed in to change notification settings - Fork 26
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
UB-1407: added timeouts to umount operations #237
Conversation
remote/mounter/block_device_utils/fs.go, line 95 at r1 (raw file):
Please define as const (umountTimeout) - see MultipathTimeout in mpath.go |
remote/mounter/block_device_utils/mpath.go, line 30 at r1 (raw file):
Nice :-) |
remote/mounter/block_device_utils/mpath.go, line 60 at r1 (raw file):
Should use MultipathTimeout |
remote/mounter/block_device_utils/mpath.go, line 234 at r1 (raw file):
Should be defined as const |
remote/mounter/block_device_utils/rescan.go, line 44 at r1 (raw file):
Should be defined as const |
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 4 of 4 files at r1.
Reviewable status: all files reviewed, 5 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: 1 of 4 files reviewed, 5 unresolved discussions (waiting on @beckmani, @olgashtivelman, and @shay-berman)
remote/mounter/block_device_utils/fs.go, line 95 at r1 (raw file):
Previously, beckmani (Isaac Beckman) wrote…
Please define as const (umountTimeout) - see MultipathTimeout in mpath.go
I defined const for numbers used more then once otherwise i just think its just abit of an overkill
but sure i will change it...
remote/mounter/block_device_utils/mpath.go, line 30 at r1 (raw file):
Previously, beckmani (Isaac Beckman) wrote…
Nice :-)
Done.
remote/mounter/block_device_utils/mpath.go, line 60 at r1 (raw file):
Previously, beckmani (Isaac Beckman) wrote…
Should use MultipathTimeout
Done.
remote/mounter/block_device_utils/mpath.go, line 234 at r1 (raw file):
Previously, beckmani (Isaac Beckman) wrote…
Should be defined as const
Done.
remote/mounter/block_device_utils/rescan.go, line 44 at r1 (raw file):
Previously, beckmani (Isaac Beckman) wrote…
Should be defined as const
Done.
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: 1 of 4 files reviewed, 8 unresolved discussions (waiting on @beckmani and @olgashtivelman)
remote/mounter/block_device_utils/block_device_utils_test.go, line 642 at r2 (raw file):
Expect(cmd).To(Equal("mount")) // second check is the umount }) It("UmountFs fails if umount command missing", func() {
please add a test that will simulate timeout reached. at least for one command line.
So you will cover it as well in unit testing.
remote/mounter/block_device_utils/fs.go, line 34 at r2 (raw file):
TimeoutMilisecondMountCmdIsDeviceMounted = 20 * 1000 // max to wait for mount command TimeoutMilisecondMountCmdMountFs = 120 * 1000 // max to wait for mounting device UmountFsTimeout = 30 * 1000
please continue the terminolagy of the const name - TimeoutMilisecondUnmountFs and also add short comment please.
thanks
remote/mounter/block_device_utils/mpath.go, line 32 at r2 (raw file):
const multipathCmd = "multipath" const MultipathTimeout = 60 * 1000 const Discovertimeout = 20 * 1000
small typo - try to use T capital.
@olgashtivelman finished to review - please apply few comments and then it LGTM |
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: 1 of 4 files reviewed, 8 unresolved discussions (waiting on @beckmani and @shay-berman)
remote/mounter/block_device_utils/block_device_utils_test.go, line 642 at r2 (raw file):
Previously, shay-berman wrote…
please add a test that will simulate timeout reached. at least for one command line.
So you will cover it as well in unit testing.
Done.
remote/mounter/block_device_utils/fs.go, line 34 at r2 (raw file):
Previously, shay-berman wrote…
please continue the terminolagy of the const name - TimeoutMilisecondUnmountFs and also add short comment please.
thanks
Done.
remote/mounter/block_device_utils/mpath.go, line 32 at r2 (raw file):
Previously, shay-berman wrote…
small typo - try to use T capital.
Done.
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: 0 of 4 files reviewed, 5 unresolved discussions (waiting on @beckmani)
added timeout to some commands as part of the unmount process as follows:
unmount (timeout 30s)
clean up command : dmsetup and multipath -f (each should be with timeout of 30s)
multipath -ll (timeout 20s)
multipath -r (timeout 60s)
rescan -r (timeout 2 minutes)
iscsiadm rescan (timeout 1 minutes)
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)