glusterfs/tests/bugs/bug-1037501.t
Anand Avati 6d3739292b cluster/afr: refactor
- Remove client side self-healing completely (opendir, openfd, lookup)
- Re-work readdir-failover to work reliably in case of NFS
- Remove unused/dead lock recovery code
- Consistently use xdata in both calls and callbacks in all FOPs
- Per-inode event generation, used to force inode ctx refresh
- Implement dirty flag support (in place of pending counts)
- Eliminate inode ctx structure, use read subvol bits + event_generation
- Implement inode ctx refreshing based on event generation
- Provide backward compatibility in transactions
- remove unused variables and functions
- make code more consistent in style and pattern
- regularize and clean up inode-write transaction code
- regularize and clean up dir-write transaction code
- regularize and clean up common FOPs
- reorganize transaction framework code
- skip setting xattrs in pending dict if nothing is pending
- re-write self-healing code using syncops
- re-write simpler self-heal-daemon

Change-Id: I1e4080c9796c8a2815c2dab4be3073f389d614a8
BUG: 1021686
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/6010
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-03-22 05:25:57 -07:00

78 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
. $(dirname $0)/../include.rc
. $(dirname $0)/../volume.rc
function write_file()
{
path="$1"; shift
echo "$*" > "$path"
}
cleanup;
TEST glusterd
TEST pidof glusterd
TEST $CLI volume info;
## Start and create a volume
mkdir -p ${B0}/${V0}-0
mkdir -p ${B0}/${V0}-1
mkdir -p ${B0}/${V0}-2
TEST $CLI volume create $V0 replica 3 $H0:$B0/${V0}-{0,1,2}
## Verify volume is created
EXPECT "$V0" volinfo_field $V0 'Volume Name';
EXPECT 'Created' volinfo_field $V0 'Status';
## Start volume and verify
TEST $CLI volume start $V0;
EXPECT 'Started' volinfo_field $V0 'Status';
## Mount native
TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $M0
TEST `echo "TEST-FILE" > $M0/File`
TEST `mkdir $M0/Dir`
TEST `ln $M0/File $M0/Link`
TEST `mknod $M0/FIFO p`
TEST $CLI volume add-brick $V0 replica 4 $H0:$B0/$V0-3 force
TEST $CLI volume add-brick $V0 replica 5 $H0:$B0/$V0-4 force
TEST $CLI volume add-brick $V0 replica 6 $H0:$B0/$V0-5 force
sleep 5
TEST gluster volume heal $V0 full
sleep 5
EXPECT 10 stat -c '%s' $B0/$V0-0/File
EXPECT 10 stat -c '%s' $B0/$V0-1/File
EXPECT 10 stat -c '%s' $B0/$V0-2/File
EXPECT 10 stat -c '%s' $B0/$V0-3/File
EXPECT 10 stat -c '%s' $B0/$V0-4/File
EXPECT 10 stat -c '%s' $B0/$V0-5/File
EXPECT 3 stat -c '%h' $B0/$V0-0/Link
EXPECT 3 stat -c '%h' $B0/$V0-1/Link
EXPECT 3 stat -c '%h' $B0/$V0-2/Link
EXPECT 3 stat -c '%h' $B0/$V0-3/Link
EXPECT 3 stat -c '%h' $B0/$V0-4/Link
EXPECT 3 stat -c '%h' $B0/$V0-5/Link
EXPECT 'directory' stat -c '%F' $B0/$V0-0/Dir
EXPECT 'directory' stat -c '%F' $B0/$V0-1/Dir
EXPECT 'directory' stat -c '%F' $B0/$V0-2/Dir
EXPECT 'directory' stat -c '%F' $B0/$V0-3/Dir
EXPECT 'directory' stat -c '%F' $B0/$V0-4/Dir
EXPECT 'directory' stat -c '%F' $B0/$V0-5/Dir
EXPECT 'fifo' stat -c '%F' $B0/$V0-0/FIFO
EXPECT 'fifo' stat -c '%F' $B0/$V0-1/FIFO
EXPECT 'fifo' stat -c '%F' $B0/$V0-2/FIFO
EXPECT 'fifo' stat -c '%F' $B0/$V0-3/FIFO
EXPECT 'fifo' stat -c '%F' $B0/$V0-4/FIFO
EXPECT 'fifo' stat -c '%F' $B0/$V0-5/FIFO
cleanup;