summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/basic/afr/root-squash-self-heal.t25
-rw-r--r--xlators/protocol/server/src/server-helpers.c1
2 files changed, 26 insertions, 0 deletions
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
diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c
index dbd26539b2f..545be6e9580 100644
--- a/xlators/protocol/server/src/server-helpers.c
+++ b/xlators/protocol/server/src/server-helpers.c
@@ -467,6 +467,7 @@ get_frame_from_request (rpcsvc_request_t *req)
req->pid != GF_CLIENT_PID_NO_ROOT_SQUASH &&
req->pid != GF_CLIENT_PID_GSYNCD &&
req->pid != GF_CLIENT_PID_DEFRAG &&
+ req->pid != GF_CLIENT_PID_AFR_SELF_HEALD &&
req->pid != GF_CLIENT_PID_QUOTA_MOUNT)
RPC_AUTH_ROOT_SQUASH (req);