summaryrefslogtreecommitdiffstats
path: root/tests/bugs/snapshot
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2015-02-05 16:12:53 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-03-10 04:42:00 -0700
commit1ae8b4c33af175545d6afe99aeb7a21896960a35 (patch)
tree4e56f0a7b8d760e9ceaea39f1b4c0b863a754218 /tests/bugs/snapshot
parent8cdd272dcf277aa4148c57458cc5477a49b08383 (diff)
snapshot: append timestamp with snapname
Appending GMT time stamp with snapname by default. If no-timestamp flag is given during snapshot creation, then time stamp will not append with snapname; Initial consumer of this feature is Samba's Shadow Copy feature. This feature allows Windows user to get previous revisions of a file. For this feature to work snapshot names under .snaps folder (USS) should have timestamp in following format appended: @GMT-YYYY.MM.DD-hh.mm.ss PS: https://www.samba.org/samba/docs/man/manpages/vfs_shadow_copy2.8.html This format is configurable by Samba conf file. Due to a limitation in Windows directory access the exact format cannot be used by USS. Therefore we have modified the file format to: _GMT-YYYY.MM.DD-hh.mm.ss Snapshot scheduling feature also required to append timestamp to the snapshot name therefore timestamp is appended in snapshot creation itself instead of doing the changes in snapview server. More info: https://www.mail-archive.com/gluster-users@gluster.org/msg18895.html Change-Id: Idac24670948cf4c0fbe916ea6690e49cbc832d07 BUG: 1189473 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/9597 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'tests/bugs/snapshot')
-rwxr-xr-xtests/bugs/snapshot/bug-1045333.t6
-rwxr-xr-xtests/bugs/snapshot/bug-1049834.t4
-rwxr-xr-xtests/bugs/snapshot/bug-1090042.t4
-rw-r--r--tests/bugs/snapshot/bug-1109770.t8
-rw-r--r--tests/bugs/snapshot/bug-1109889.t8
-rwxr-xr-xtests/bugs/snapshot/bug-1112559.t2
-rw-r--r--tests/bugs/snapshot/bug-1113975.t4
-rw-r--r--tests/bugs/snapshot/bug-1155042-dont-display-deactivated-snapshots.t2
-rwxr-xr-xtests/bugs/snapshot/bug-1157991.t4
-rwxr-xr-xtests/bugs/snapshot/bug-1162462.t2
-rw-r--r--tests/bugs/snapshot/bug-1162498.t8
-rw-r--r--tests/bugs/snapshot/bug-1164613.t2
-rwxr-xr-xtests/bugs/snapshot/bug-1166197.t4
-rw-r--r--tests/bugs/snapshot/bug-1167580-set-proper-uid-and-gid-during-nfs-access.t4
14 files changed, 31 insertions, 31 deletions
diff --git a/tests/bugs/snapshot/bug-1045333.t b/tests/bugs/snapshot/bug-1045333.t
index ad2d0021aaa..6c0b995b5b0 100755
--- a/tests/bugs/snapshot/bug-1045333.t
+++ b/tests/bugs/snapshot/bug-1045333.t
@@ -19,13 +19,13 @@ 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 $S1 $V0
+TEST $CLI snapshot create $S1 $V0 no-timestamp
TEST snapshot_exists 0 $S1
-TEST $CLI snapshot create $S2 $V0
+TEST $CLI snapshot create $S2 $V0 no-timestamp
TEST snapshot_exists 0 $S2
-TEST $CLI snapshot create $S3 $V0
+TEST $CLI snapshot create $S3 $V0 no-timestamp
TEST snapshot_exists 0 $S3
diff --git a/tests/bugs/snapshot/bug-1049834.t b/tests/bugs/snapshot/bug-1049834.t
index cdb8a3babf8..29c75cc7f96 100755
--- a/tests/bugs/snapshot/bug-1049834.t
+++ b/tests/bugs/snapshot/bug-1049834.t
@@ -30,11 +30,11 @@ TEST snapshot_n_exists $V0 3 $V0_snap
#Creating the 4th snapshot on the volume and expecting it to be created
# but with the deletion of the oldest snapshot i.e 1st snapshot
-TEST $CLI_1 snapshot create ${V0}_snap4 ${V0}
+TEST $CLI_1 snapshot create ${V0}_snap4 ${V0} no-timestamp
TEST snapshot_exists 1 ${V0}_snap4
TEST ! snapshot_exists 1 ${V0}_snap1
TEST $CLI_1 snapshot delete ${V0}_snap4
-TEST $CLI_1 snapshot create ${V0}_snap1 ${V0}
+TEST $CLI_1 snapshot create ${V0}_snap1 ${V0} no-timestamp
TEST snapshot_exists 1 ${V0}_snap1
#Deleting the 4 snaps
diff --git a/tests/bugs/snapshot/bug-1090042.t b/tests/bugs/snapshot/bug-1090042.t
index 9eb3a9aecc4..98531a9751e 100755
--- a/tests/bugs/snapshot/bug-1090042.t
+++ b/tests/bugs/snapshot/bug-1090042.t
@@ -16,11 +16,11 @@ TEST $CLI volume start $V0;
TEST kill_brick $V0 $H0 $L1;
#Normal snap create should fail
-TEST ! $CLI snapshot create ${V0}_snap1 $V0;
+TEST ! $CLI snapshot create ${V0}_snap1 $V0 no-timestamp;
TEST ! snapshot_exists 0 ${V0}_snap1;
#With changes introduced in BZ #1184344 force snap create should fail too
-TEST ! $CLI snapshot create ${V0}_snap1 $V0 force;
+TEST ! $CLI snapshot create ${V0}_snap1 $V0 no-timestamp force;
TEST ! snapshot_exists 0 ${V0}_snap1;
cleanup;
diff --git a/tests/bugs/snapshot/bug-1109770.t b/tests/bugs/snapshot/bug-1109770.t
index eca4969f2e3..22511995937 100644
--- a/tests/bugs/snapshot/bug-1109770.t
+++ b/tests/bugs/snapshot/bug-1109770.t
@@ -23,11 +23,11 @@ TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $M0;
for i in {1..10} ; do echo "file" > $M0/file$i ; done
-TEST $CLI snapshot create snap1 $V0;
+TEST $CLI snapshot create snap1 $V0 no-timestamp;
for i in {11..20} ; do echo "file" > $M0/file$i ; done
-TEST $CLI snapshot create snap2 $V0;
+TEST $CLI snapshot create snap2 $V0 no-timestamp;
mkdir $M0/dir1;
mkdir $M0/dir2;
@@ -35,12 +35,12 @@ mkdir $M0/dir2;
for i in {1..10} ; do echo "foo" > $M0/dir1/foo$i ; done
for i in {1..10} ; do echo "foo" > $M0/dir2/foo$i ; done
-TEST $CLI snapshot create snap3 $V0;
+TEST $CLI snapshot create snap3 $V0 no-timestamp;
for i in {11..20} ; do echo "foo" > $M0/dir1/foo$i ; done
for i in {11..20} ; do echo "foo" > $M0/dir2/foo$i ; done
-TEST $CLI snapshot create snap4 $V0;
+TEST $CLI snapshot create snap4 $V0 no-timestamp;
TEST $CLI volume set $V0 features.uss enable;
diff --git a/tests/bugs/snapshot/bug-1109889.t b/tests/bugs/snapshot/bug-1109889.t
index eac5ac17f5b..6b0eb37f14f 100644
--- a/tests/bugs/snapshot/bug-1109889.t
+++ b/tests/bugs/snapshot/bug-1109889.t
@@ -27,11 +27,11 @@ for i in {1..10} ; do echo "file" > $M0/file$i ; done
TEST $CLI snapshot config activate-on-create enable
-TEST $CLI snapshot create snap1 $V0;
+TEST $CLI snapshot create snap1 $V0 no-timestamp;
for i in {11..20} ; do echo "file" > $M0/file$i ; done
-TEST $CLI snapshot create snap2 $V0;
+TEST $CLI snapshot create snap2 $V0 no-timestamp;
mkdir $M0/dir1;
mkdir $M0/dir2;
@@ -39,12 +39,12 @@ mkdir $M0/dir2;
for i in {1..10} ; do echo "foo" > $M0/dir1/foo$i ; done
for i in {1..10} ; do echo "foo" > $M0/dir2/foo$i ; done
-TEST $CLI snapshot create snap3 $V0;
+TEST $CLI snapshot create snap3 $V0 no-timestamp;
for i in {11..20} ; do echo "foo" > $M0/dir1/foo$i ; done
for i in {11..20} ; do echo "foo" > $M0/dir2/foo$i ; done
-TEST $CLI snapshot create snap4 $V0;
+TEST $CLI snapshot create snap4 $V0 no-timestamp;
TEST $CLI volume set $V0 features.uss enable;
diff --git a/tests/bugs/snapshot/bug-1112559.t b/tests/bugs/snapshot/bug-1112559.t
index f318db61b8a..8a2e228d3da 100755
--- a/tests/bugs/snapshot/bug-1112559.t
+++ b/tests/bugs/snapshot/bug-1112559.t
@@ -34,7 +34,7 @@ TEST $CLI_1 volume create $V0 $H1:$L1 $H2:$L2
TEST $CLI_1 volume start $V0
#Create snapshot and add a peer together
-$CLI_1 snapshot create ${V0}_snap1 ${V0} &
+$CLI_1 snapshot create ${V0}_snap1 ${V0} no-timestamp &
PID_1=$!
$CLI_1 peer probe $H3
wait $PID_1
diff --git a/tests/bugs/snapshot/bug-1113975.t b/tests/bugs/snapshot/bug-1113975.t
index c1b9b1e3e2c..86c1739fb46 100644
--- a/tests/bugs/snapshot/bug-1113975.t
+++ b/tests/bugs/snapshot/bug-1113975.t
@@ -21,11 +21,11 @@ TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $M0;
for i in {1..10} ; do echo "file" > $M0/file$i ; done
-TEST $CLI snapshot create snap1 $V0;
+TEST $CLI snapshot create snap1 $V0 no-timestamp;
for i in {11..20} ; do echo "file" > $M0/file$i ; done
-TEST $CLI snapshot create snap2 $V0;
+TEST $CLI snapshot create snap2 $V0 no-timestamp;
TEST $CLI volume stop $V0
diff --git a/tests/bugs/snapshot/bug-1155042-dont-display-deactivated-snapshots.t b/tests/bugs/snapshot/bug-1155042-dont-display-deactivated-snapshots.t
index cf35caad0aa..6697c263ac1 100644
--- a/tests/bugs/snapshot/bug-1155042-dont-display-deactivated-snapshots.t
+++ b/tests/bugs/snapshot/bug-1155042-dont-display-deactivated-snapshots.t
@@ -20,7 +20,7 @@ TEST $GFS --volfile-server=$H0 --volfile-id=$V0 $M0
# create 10 snapshots and check if all are being reflected
# in the USS world
gluster snapshot config activate-on-create enable
-for i in {1..10}; do $CLI snapshot create snap$i $V0; done
+for i in {1..10}; do $CLI snapshot create snap$i $V0 no-timestamp; done
EXPECT 10 uss_count_snap_displayed $M0
# snapshots should not be displayed after deactivation
diff --git a/tests/bugs/snapshot/bug-1157991.t b/tests/bugs/snapshot/bug-1157991.t
index 77440bc2301..f626ef2b705 100755
--- a/tests/bugs/snapshot/bug-1157991.t
+++ b/tests/bugs/snapshot/bug-1157991.t
@@ -13,11 +13,11 @@ TEST setup_lvm 1
TEST $CLI volume create $V0 $H0:$L1
TEST $CLI volume start $V0
-TEST $CLI snapshot create snap1 $V0
+TEST $CLI snapshot create snap1 $V0 no-timestamp
EXPECT 'Stopped' snapshot_status snap1;
TEST $CLI snapshot config activate-on-create enable
-TEST $CLI snapshot create snap2 $V0
+TEST $CLI snapshot create snap2 $V0 no-timestamp
EXPECT 'Started' snapshot_status snap2;
#Clean up
diff --git a/tests/bugs/snapshot/bug-1162462.t b/tests/bugs/snapshot/bug-1162462.t
index aed79fdd2c7..5c2e4fe37f0 100755
--- a/tests/bugs/snapshot/bug-1162462.t
+++ b/tests/bugs/snapshot/bug-1162462.t
@@ -22,7 +22,7 @@ ln -s $M0/file1 $M0/test/file_symlink
ls -l $M0/ > /dev/null
ls -l $M0/test/ > /dev/null
-TEST $CLI snapshot create snap1 $V0;
+TEST $CLI snapshot create snap1 $V0 no-timestamp;
$CLI snapshot activate snap1;
EXPECT 'Started' snapshot_status snap1;
diff --git a/tests/bugs/snapshot/bug-1162498.t b/tests/bugs/snapshot/bug-1162498.t
index 06b3d74691c..665d60fd0bf 100644
--- a/tests/bugs/snapshot/bug-1162498.t
+++ b/tests/bugs/snapshot/bug-1162498.t
@@ -20,13 +20,13 @@ TEST glusterfs -s $H0 --volfile-id=$V0 $M0
TEST mkdir $M0/xyz
-TEST $CLI snapshot create snap1 $V0
-TEST $CLI snapshot create snap2 $V0
+TEST $CLI snapshot create snap1 $V0 no-timestamp
+TEST $CLI snapshot create snap2 $V0 no-timestamp
TEST rmdir $M0/xyz
-TEST $CLI snapshot create snap3 $V0
-TEST $CLI snapshot create snap4 $V0
+TEST $CLI snapshot create snap3 $V0 no-timestamp
+TEST $CLI snapshot create snap4 $V0 no-timestamp
TEST mkdir $M0/xyz
TEST ls $M0/xyz/.snaps/
diff --git a/tests/bugs/snapshot/bug-1164613.t b/tests/bugs/snapshot/bug-1164613.t
index 9cf122bc4b8..d7f956ce369 100644
--- a/tests/bugs/snapshot/bug-1164613.t
+++ b/tests/bugs/snapshot/bug-1164613.t
@@ -16,7 +16,7 @@ TEST glusterfs -s $H0 --volfile-id=$V0 $M0
TEST touch $M0/testfile
-TEST $CLI snapshot create snaps $V0
+TEST $CLI snapshot create snaps $V0 no-timestamp
TEST $CLI snapshot activate snaps
TEST $CLI volume set $V0 features.uss enable
TEST $CLI volume set $V0 snapshot-directory snaps
diff --git a/tests/bugs/snapshot/bug-1166197.t b/tests/bugs/snapshot/bug-1166197.t
index 6592382df6c..65b242250bf 100755
--- a/tests/bugs/snapshot/bug-1166197.t
+++ b/tests/bugs/snapshot/bug-1166197.t
@@ -23,8 +23,8 @@ EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Started' volinfo_field $V0 'Status';
TEST mount_nfs $H0:/$V0 $N0 nolock
TEST mkdir $N0/testdir
-TEST $CLI snapshot create snap1 $V0
-TEST $CLI snapshot create snap2 $V0
+TEST $CLI snapshot create snap1 $V0 no-timestamp
+TEST $CLI snapshot create snap2 $V0 no-timestamp
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "0" STAT $N0/testdir/.snaps
diff --git a/tests/bugs/snapshot/bug-1167580-set-proper-uid-and-gid-during-nfs-access.t b/tests/bugs/snapshot/bug-1167580-set-proper-uid-and-gid-during-nfs-access.t
index 5bea7a71306..0893826b343 100644
--- a/tests/bugs/snapshot/bug-1167580-set-proper-uid-and-gid-during-nfs-access.t
+++ b/tests/bugs/snapshot/bug-1167580-set-proper-uid-and-gid-during-nfs-access.t
@@ -93,7 +93,7 @@ chmod 700 $M0/README
# enable uss and take a snapshot
TEST $CLI volume set $V0 uss enable
TEST $CLI snapshot config activate-on-create on
-TEST $CLI snapshot create snap1 $V0
+TEST $CLI snapshot create snap1 $V0 no-timestamp
# try to access the file using user1 account.
# It should succeed with both normal mount and snapshot world.
@@ -146,7 +146,7 @@ create_user $user5
chgrp $group3 $M0/file3
-TEST $CLI snapshot create snap2 $V0
+TEST $CLI snapshot create snap2 $V0 no-timestamp
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Y" check_if_permitted $user3 $M0/file3 cat
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Y" check_if_permitted $user3 $M0/.snaps/snap2/file3 cat