diff options
author | Vijaikumar M <vmallika@redhat.com> | 2014-02-13 16:32:12 +0530 |
---|---|---|
committer | Rajesh Joseph <rjoseph@redhat.com> | 2014-02-13 06:18:15 -0800 |
commit | 96f6c5159da92500e8ddb21a487d2848a2b1f7db (patch) | |
tree | 173aadb72ff76d27ef6589a2ed1eed5c5220abff /tests/bugs | |
parent | a6351ee1c823a295f592f4adf5876a6166d47afe (diff) |
glusterd/snapshot: Use snap uuid to create lvm snapshot
Using snap uuid to create lvm snapshot will solve the problem of having
'-' in the snap name or snap name is too long.
Change-Id: If204f02a8f5de599fb409d06c7893ef3542a6300
BUG: 1045333
Signed-off-by: Vijaikumar M <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/6709
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'tests/bugs')
-rw-r--r-- | tests/bugs/bug-1045333.t | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/bugs/bug-1045333.t b/tests/bugs/bug-1045333.t new file mode 100644 index 000000000..5abdd5558 --- /dev/null +++ b/tests/bugs/bug-1045333.t @@ -0,0 +1,48 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../snapshot.rc + +cleanup; +TEST glusterd; +TEST pidof glusterd; + +TEST setup_lvm 1 + +TEST $CLI volume create $V0 $H0:$L1 +TEST $CLI volume start $V0 + + +S1="${V0}-snap1" #Create snapshot with name contains hyphen(-) +S2="-${V0}-snap2" #Create snapshot with name starts with hyphen(-) +#Create snapshot with a long name +S3="${V0}_single_gluster_volume_is_accessible_by_multiple_clients_offline_snapshot_is_a_long_name" + +TEST $CLI snapshot create $V0 -n $S1 +TEST snapshot_exists $S1 + +TEST $CLI snapshot create $V0 -n $S2 +TEST snapshot_exists $S2 + +TEST $CLI snapshot create $V0 -n $S3 +TEST snapshot_exists $S3 + + +TEST mount -t glusterfs $H0:/$V0/snaps/$S1 $M0 +TEST umount -f $M0 + +TEST mount -t glusterfs $H0:/$V0/snaps/$S2 $M0 +TEST umount -f $M0 + +TEST mount -t glusterfs $H0:/$V0/snaps/$S3 $M0 +TEST umount -f $M0 + +#Clean up +TEST $CLI snapshot delete $V0 -s $S1 +TEST $CLI snapshot delete $V0 -s $S2 +TEST $CLI snapshot delete $V0 -s $S3 + +TEST $CLI volume stop $V0 force +TEST $CLI volume delete $V0 + +cleanup; |