You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add timeout for nfs mount within kdumpctl & mkdumprd
In kdumpctl and mkdumprd, for nfs dump target, cmd mount will be used to
mount nfs dump target to local directory. However there is no time limit
for mount, and it may take a long time for mount to finish, no matter
success or fail, when network connection is unstable.
E.g we can emulate the package loss using the following command:
$ tc qdisc add dev tun0 root handle 1: prio
$ tc qdisc add dev tun0 parent 1:3 handle 30: netem delay 2000ms 1000ms loss 80%
$ tc filter add dev tun0 protocol ip parent 1:0 prio 3 u32 match ip dst <nfs_server_ip> flowid 1:3
This will emulate 80% network package loss to <nfs_server_ip>, then we
invoke nfs mount:
$ time mount -t nfs <nfs_server_ip>:<nfs_dir> /mnt
real 354m56.200s
user 0m0.003s
sys 0m0.013s
$ mount | grep nfs
<nfs_server_ip>:<nfs_dir> on /mnt type nfs4 (...)
As we can see, though mount succeeded finally, it took near 6h to finish. The
long time waiting makes no sense and should be ended as early, so user can
check network issues and retry.
This issue also noticed in QE testing, because for beaker test tasks, if
one task doesn't finish within a specific time period, the task will be
killed and fail. We'd better set a timeout limit for nfs mount, in order
to prevent it from connecting to nfs server timelessly.
This patch will set timeout duration as 5min for kdumpctl, and 10min for
mkdumprd, as I think they are enough for normal cases as well as bail
out as early if network do encounter problems.
Signed-off-by: Tao Liu <[email protected]>
0 commit comments