~ubuntu-branches/debian/sid/glusterfs/sid

« back to all changes in this revision

Viewing changes to tests/bugs/bug-974007.t

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2014-04-22 10:00:41 UTC
  • mfrom: (1.3.25)
  • Revision ID: package-import@ubuntu.com-20140422100041-6mur2ttyvb8zzpfq
Tags: 3.5.0-1
* New upstream release.
  - Rewrite patch 01-spelling-error.
  - Adjust lintian overrides.
  - Install new files.
  - The offical tarball is not properly generated, hack it around.
  - Add symlink from fusermount-glusterfs manpage to mount.glusterfs.
  - Move gsync-sync-gfid from /usr/share to /usr/lib.
  - Add benchmarking directory.
* Remove old versioned build dependencies and build depend on libglib2.0-dev.
* Add lintian override for possible-gpl-code-linked-with-openssl. It is the
  same false positive like with the gluster-server package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
#Test case: Create a distributed replicate volume, and remove multiple
 
4
#replica pairs in a single remove-brick command.
 
5
 
 
6
. $(dirname $0)/../include.rc
 
7
. $(dirname $0)/../volume.rc
 
8
 
 
9
cleanup;
 
10
 
 
11
#Basic checks
 
12
TEST glusterd
 
13
TEST pidof glusterd
 
14
TEST $CLI volume info
 
15
 
 
16
#Create a 3X2 distributed-replicate volume
 
17
TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1..6};
 
18
TEST $CLI volume start $V0
 
19
 
 
20
# Mount FUSE and create files
 
21
TEST glusterfs -s $H0 --volfile-id $V0 $M0
 
22
TEST touch $M0/file{1..10}
 
23
 
 
24
# Remove bricks from two sub-volumes to make it a 1x2 vol.
 
25
# Bricks in question are given in a random order but from the same subvols.
 
26
function remove_brick_start_status {
 
27
        $CLI volume remove-brick $V0 \
 
28
        $H0:$B0/${V0}6  $H0:$B0/${V0}1 \
 
29
        $H0:$B0/${V0}2  $H0:$B0/${V0}5 start 2>&1 |grep -oE "success|failed"
 
30
}
 
31
EXPECT "success"  remove_brick_start_status;
 
32
 
 
33
# Wait for rebalance to complete
 
34
EXPECT_WITHIN 10 "completed" remove_brick_status_completed_field "$V0" "$H0:$B0/${V0}6 $H0:$B0/${V0}1 $H0:$B0/${V0}2 $H0:$B0/${V0}5"
 
35
 
 
36
# Check commit status
 
37
function remove_brick_commit_status {
 
38
        $CLI volume remove-brick $V0 \
 
39
         $H0:$B0/${V0}6  $H0:$B0/${V0}1 \
 
40
         $H0:$B0/${V0}2  $H0:$B0/${V0}5 commit 2>&1 |grep -oE "success|failed"
 
41
}
 
42
EXPECT "success" remove_brick_commit_status;
 
43
 
 
44
# Check the volume type
 
45
EXPECT "Replicate" echo `$CLI volume info |grep Type |awk '{print $2}'`
 
46
 
 
47
TEST umount $M0
 
48
TEST $CLI volume stop $V0
 
49
TEST $CLI volume delete $V0;
 
50
TEST ! $CLI volume info $V0;
 
51
 
 
52
cleanup;