From 7319b01ffa3d4ff7b1405873c8caeaf8a1f7b5d6 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Thu, 4 Dec 2014 07:20:35 +0530 Subject: protocol/server: No root-squash checks for self-heal pid Problem: Self-heal pid used to be -1 which was colliding with gsyncd. Gsyncd was not checked for root-squash authentication. Recently self-heal pid changed to -6, but root-squash authentication is not disabled for this. Fix: disable root-squash authentication for self-heal Change-Id: I93233d4ae681cb936d166b22992eb47c658ea977 BUG: 1170407 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/9231 Reviewed-by: Vijay Bellur Tested-by: Gluster Build System --- tests/basic/afr/root-squash-self-heal.t | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/basic/afr/root-squash-self-heal.t (limited to 'tests') diff --git a/tests/basic/afr/root-squash-self-heal.t b/tests/basic/afr/root-squash-self-heal.t new file mode 100644 index 00000000000..fa9a163e623 --- /dev/null +++ b/tests/basic/afr/root-squash-self-heal.t @@ -0,0 +1,25 @@ +#!/bin/bash + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc + +cleanup; + +TEST glusterd +TEST pidof glusterd +TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0,1} +TEST $CLI volume set $V0 performance.stat-prefetch off +TEST $CLI volume set $V0 self-heal-daemon off +TEST $CLI volume set $V0 server.root-squash on +TEST $CLI volume start $V0 +TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0 --no-root-squash=yes --use-readdirp=no +TEST kill_brick $V0 $H0 $B0/${V0}0 +HEAL_FILES=0 +echo abc > $M0/a + +TEST $CLI volume start $V0 force +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" afr_child_up_status $V0 0 +find $M0 | xargs stat > /dev/null +EXPECT_WITHIN $HEAL_TIMEOUT "0" afr_get_pending_heal_count $V0 + +cleanup -- cgit