From e311014d94c7fcfd8c5e7abe3aca7d99f43e0d91 Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Tue, 8 Jul 2014 08:25:36 -0400 Subject: nfs: prevent assertion error with MOUNT over UDP see http://review.gluster.org/#/c/8258/, http://review.gluster.org/8241; and BZs 1116997, 1116503, respectively. The MOUNT service over UDP runs in a separate thread. This thread does not have the correct *THIS xlator set. *THIS points to the global (base) xlator structure, but GF_CALLOC() requires it to be the NFS-xlator so that assertions can get validated correctly. This is solved by passing the NFS-xlator to the pthread function, and setting the *THIS pointer explicitly in the new thread. It seems that on occasion (needs further investigation) MOUNT over UDP does not unregister itself. There can also be issues when the kernel NLM implementation has been registered at portmap/rpcbind, so adding some unregister procedures in the cleanup of the test-cases. Change-Id: Iea3bafd65bf480f2b12da91875c73571594d52d3 BUG: 1117256 Signed-off-by: Kaleb S. KEITHLEY Reviewed-on: http://review.gluster.org/8262 Tested-by: Gluster Build System Reviewed-by: Niels de Vos Reviewed-by: Santosh Pradhan --- tests/volume.rc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/volume.rc') diff --git a/tests/volume.rc b/tests/volume.rc index d942e485fa5..c3d51d9c2a6 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -210,3 +210,9 @@ function dht_get_layout { local my_xa=trusted.glusterfs.dht getfattr -d -e hex -n $my_xa $1 2> /dev/null | grep "$my_xa=" | cut -d= -f2 } + +function force_umount { + umount -f $1 + if [ $? -eq 0 ]; then echo "Y"; else echo "N"; fi +} + -- cgit