Closed shay-berman closed 6 years ago
remote/mounter/block_device_mounter_utils/block_device_mounter_utils.go, line 97 at r1 (raw file):
} b.logger.Debug("mpathFlock.TryLock failed", logs.Args{{"error", err}}) time.Sleep(time.Duration(500*time.Millisecond))
better make it a constant instead of hard-code value
Comments from Reviewable
remote/mounter/block_device_mounter_utils/block_device_mounter_utils.go, line 134 at r1 (raw file):
if !rescanForCleanUp { // Only when run rescan for new device, try to check if its already exist to reduce rescans
"Check if device exists only for new device"
Comments from Reviewable
Reviewed 2 of 2 files at r1. Review status: all files reviewed at latest revision, 2 unresolved discussions.
Comments from Reviewable
increase sleep time on mpath lock and rescan lock from 100 to 500ms, so it will have less read IO while waiting for lock (since rescan usually take 1-2 seconds, so no need to have so many retries)
Fix wrong debug message in rescanLock (by mistake it was printed as mpathLock). Found by @danapython
Do not run discover during rescan if the rescan was triggered during detach. becuase during detach the discover will always fail and its a waist of time and also it will start run sg_inq on each device which is also waist of time and few error in the log that are not relevant. SO move the discover during rescan only if rescan triggered for attach. this is help us also to identify when we really have bad WWN show up in the multipath -ll.
Change message log from Debug to Error if discover doesn't find the WWN in multipath (usually it indicate the bad multipathing WWN in multipath -ll output. so its better to be in error level rather then debug level)
This change is