From: Elena Gryaznova Date: Mon, 22 Mar 2021 16:55:02 +0000 (+0300) Subject: LU-14544 tests: duplicated export entries X-Git-Tag: 2.14.52~8 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F42130%2F5;p=fs%2Flustre-release.git LU-14544 tests: duplicated export entries File /etc/exports could have $MNTPNT entry if previous NFS tests interrupted. With duplicated entries in /etc/exports nfs server service fails to start/restart in RHEL 8 and SLES15. Patch cleanups exports file before adding $MNTPNT entry. Test-Parameters: trivial clientdistro=el8.3 serverdistro=el8.3 testlist=parallel-scale-nfsv3,parallel-scale-nfsv4 Signed-off-by: Elena Gryaznova HPE-bug-id: LUS-6291 Reviewed-by: Alexander Lezhoev Reviewed-by: Andriy Skulysh Change-Id: I738bd0e8e79dc1ba84e6aa70e06fa47c49a935e0 Reviewed-on: https://review.whamcloud.com/42130 Tested-by: jenkins Reviewed-by: Andrew Perepechko Reviewed-by: Alexander Boyko Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/setup-nfs.sh b/lustre/tests/setup-nfs.sh index daed37a..ab3afff 100755 --- a/lustre/tests/setup-nfs.sh +++ b/lustre/tests/setup-nfs.sh @@ -23,8 +23,10 @@ setup_nfs() { mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs; }" || return 1 sleep 5 - do_nodes $LUSTRE_CLIENT "echo $MNTPNT *\($export_opts_v\) \ - >> /etc/exports" || return 1 + # get rid of old $MNTPNT entries in /etc/exports + do_nodes $LUSTRE_CLIENT "sed -i '/${MNTPNT##*/}/d' /etc/exports && + echo $MNTPNT *\($export_opts_v\) >> /etc/exports" || + return 1 # restart nfs server according to distro do_nodes $LUSTRE_CLIENT "{ [[ -e /etc/SuSE-release ]] &&