-
Notifications
You must be signed in to change notification settings - Fork 26
Conversation
…(phase2) - if not mapped to host then skip instead of fail - reduce RemoveAll(mountpoint) to Remove - extend UnmountRequest with mountpoint
…nd mounter(will be used in k8s side)
…(phase2) - if not mapped to host then skip instead of fail - reduce RemoveAll(mountpoint) to Remove - extend UnmountRequest with mountpoint
…nd mounter(will be used in k8s side)
…IBM/ubiquity into fix/idempotent_issues_in_umount
… given device if mounted Next step is to fix idempotent during mount flow (check if its already mounted and if its mounted to the right mountpoint path)
Passed ubiquity sanity (with both this PR and IBM/ubiquity-k8s#177) |
Review status: 0 of 18 files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. remote/mounter/mounter_factory.go, line 35 at r1 (raw file):
You don't need this else, if all the others are false it will just result in the last one. Comments from Reviewable |
Could we in any way use this module? https://github.com/kubernetes/kubernetes/blob/master/pkg/util/mount/mount.go Review status: 0 of 18 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. remote/mounter/mounter_factory.go, line 35 at r1 (raw file): Previously, tzurE wrote…
Right, but I think it's more readable this way and prevents a mistake of adding more code at the end of the function by mistake. remote/mounter/block_device_utils/fs.go, line 31 at r1 (raw file):
how did you determine the timeouts? Comments from Reviewable |
or even https://golang.org/src/syscall/syscall_linux.go?s=20289:20384#L786 Review status: 0 of 18 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. Comments from Reviewable |
So yes we can use it, but we should do it as refactoring task later on (mentioned it in our refactor list). Review status: 0 of 18 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. remote/mounter/mounter_factory.go, line 35 at r1 (raw file): Previously, ranhrl (Ran Harel) wrote…
yes, explicit is better than implicit (PEP 20) remote/mounter/block_device_utils/fs.go, line 31 at r1 (raw file): Previously, ranhrl (Ran Harel) wrote…
Just by experience, mount command to show the devices should be immidiate (so 20s it more then enough, I can do shorter) Agree? Comments from Reviewable |
@ranhrl review it today and approved. |
This PR in conjunction with IBM/ubiquity-k8s#177 (it provides some mounter side facilities to be used in the ubiquity-k8s flex side to address flex side idempotent aspects)
This PR introduce the following:
fixes idempotent issues in the MountDeviceFlow:
1.1. Skip mount if already mounted to the right mountpoint. (refactor IsDeviceMounted to return also the mountpoints of the mounted device)
1.2. If mounted to wrong mountpoint it should fail.
(note: set 20second timeout for identify if its already mounted)
Add timeout to "mount" command executions to prevent any potential hanging during the mount command. 2.1. mount to identify if device is mounted - timeout set to 20seconds.
2.2. mount for actually mounting device set timeout to 2 minutes.
New interface mounter_factory.go [ubiquity/remote/mounter/mounter_factory.go] to get the relevant remote backend by backend name.
(used by ubiquity-k8s/controller/controller.go)
Add new methods to the Executer interface : Lstat, IsDir, Symlink, IsSlink.
(used by ubiquity-k8s/controller/controller.go to handle idempotent aspects in the flex mount side of thing)
Full unit testing coverage to all the items above.
Added few TODO lines for potential Idempotent items to improve in the umount flow.
How to test
Simulate the relevant idempotent issue in the mount flow, Including hanging mount commands to validate the timeouts as well.
This change is