forked from gluster/glusterfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shd/symlink: soft links entry recreate fails
While an entry heal is on going, if there is a pending metadata set on the source dentry, then the recreation of soft link will fail to create on the destination. This patch introduce a new flag and avoid overloading the newentry mark flag Change-Id: I862ab8d4318746ef2b15823ef5ad2272bff8aed7 Fixes: gluster#4065 Signed-off-by: Mohammed Rafi KC <[email protected]>
- Loading branch information
Showing
2 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
tests/bugs/replicate/issue-4064-softlink-entry-recreation.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/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 3 $H0:$B0/${V0}{0,1,2}; | ||
TEST $CLI volume set $V0 cluster.self-heal-daemon off | ||
TEST $CLI volume start $V0 | ||
|
||
TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 --attribute-timeout=0 --entry-timeout=0 | ||
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" afr_child_up_status $V0 0 | ||
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" afr_child_up_status $V0 1 | ||
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" afr_child_up_status $V0 2 | ||
echo "Data">$M0/FILE | ||
ret=$? | ||
TEST [ $ret -eq 0 ] | ||
|
||
TEST kill_brick $V0 $H0 $B0/${V0}2 | ||
|
||
TEST ln -s $M0/FILE $M0/SOFT | ||
TEST ln $M0/FILE $M0/HARD | ||
#hardlink to a softlink | ||
TEST ln $M0/SOFT $M0/SOFTHARD | ||
|
||
#Set a metadata heal on the softlink | ||
TEST chown -h root:root $M0/SOFT | ||
|
||
#start the brick | ||
TEST $CLI volume start $V0 force | ||
|
||
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" brick_up_status $V0 $H0 $B0/${V0}2 | ||
|
||
TEST $CLI volume set $V0 cluster.self-heal-daemon on | ||
EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 0 | ||
EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 1 | ||
EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_in_shd $V0 2 | ||
TEST $CLI volume heal $V0 | ||
EXPECT_WITHIN $HEAL_TIMEOUT "^0$" get_pending_heal_count $V0 | ||
|
||
EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 | ||
cleanup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters