From: Yu Jian Date: Wed, 18 Jul 2012 12:35:30 +0000 (+0800) Subject: LU-1471 tests: check rpcidmapd service in setup-nfs.sh X-Git-Tag: 2.1.3-RC1~20 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=0b41d429b31553ba3ee6545d4d470c0a155ff6b2;p=fs%2Flustre-release.git LU-1471 tests: check rpcidmapd service in setup-nfs.sh The rpcidmapd system service is not in SLES11 distro, which caused "service: no such service rpcidmapd" error while running setup-nfs.sh. This patch fixes the above issue by checking the service before restarting or stopping it. Test-Parameters: testlist=parallel-scale-nfsv3,parallel-scale-nfsv4 Signed-off-by: Yu Jian Change-Id: I87b0d496c0214329fa185a935a3e049a5dd2a1f4 Reviewed-on: http://review.whamcloud.com/3431 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Wei Liu Reviewed-by: Minh Diep Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/setup-nfs.sh b/lustre/tests/setup-nfs.sh index 97c8c31..4b7764d 100755 --- a/lustre/tests/setup-nfs.sh +++ b/lustre/tests/setup-nfs.sh @@ -24,7 +24,9 @@ setup_nfs() { do_nodes $LUSTRE_CLIENT "service nfs restart" || return 1 - do_nodes $NFS_CLIENTS "service rpcidmapd restart" || return 1 + do_nodes $NFS_CLIENTS "chkconfig --list rpcidmapd 2>/dev/null | + grep -q rpcidmapd && service rpcidmapd restart || + true" do_nodes $LUSTRE_CLIENT "exportfs -o $export_opts_v *:$MNTPNT \ && exportfs -v" || return 1 @@ -52,7 +54,9 @@ cleanup_nfs() { do_nodes $NFS_CLIENTS "umount -f $MNTPNT" || return 1 echo -e "\nUnexporting Lustre filesystem..." - do_nodes $NFS_CLIENTS "service rpcidmapd stop" || return 1 + do_nodes $NFS_CLIENTS "chkconfig --list rpcidmapd 2>/dev/null | + grep -q rpcidmapd && service rpcidmapd stop || + true" do_nodes $LUSTRE_CLIENT "service nfs stop" || return 1