From 7967e3e5cfd330190c2bcc45d3a111a1d563a7a0 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Tue, 30 Apr 2013 00:20:33 +0530 Subject: cluster/afr: Avoid self-healing extended attribute used by SELinux. Since removexattr() fails to remove "security.selinux" in a system where SELinux is enforcing, xattr self-healing fails. As a consequence of this, user extended attributes are not being healed. Added a check in afr to prune SELinux xattr from the dictionary used for removing xattrs from the sink. Minor changes in tests and md-cache as well. Signed-off-by: Vijay Bellur Change-Id: I854bfc0098dde812ce2afe64b125ee40c04bdeb1 BUG: 957877 Reviewed-on: http://review.gluster.org/4905 Reviewed-by: Venky Shankar Tested-by: Gluster Build System Reviewed-by: Anand Avati --- tests/bugs/bug-957877.t | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/bugs/bug-957877.t (limited to 'tests/bugs/bug-957877.t') diff --git a/tests/bugs/bug-957877.t b/tests/bugs/bug-957877.t new file mode 100644 index 000000000..23aefea25 --- /dev/null +++ b/tests/bugs/bug-957877.t @@ -0,0 +1,31 @@ +#!/bin/bash +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc +. $(dirname $0)/../afr.rc +cleanup; + +TEST glusterd +TEST pidof glusterd +TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{0,1} +TEST $CLI volume start $V0; + +TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $M0; +kill_brick $V0 $H0 $B0/${V0}0 +TEST touch $M0/f1 +TEST setfattr -n "user.foo" -v "test" $M0/f1 + +BRICK=$B0"/${V0}1" + +TEST $CLI volume start $V0 force +sleep 5 +TEST $CLI volume heal $V0 + +# Wait for self-heal to complete +EXPECT_WITHIN 30 '0' count_sh_entries $BRICK; + +TEST getfattr -n "user.foo" $B0/${V0}0/f1; + +TEST $CLI volume stop $V0; +TEST $CLI volume delete $V0; + +cleanup; -- cgit