From 9a2b3fb8b9ff28edafa012dacc5f5f0e4ee1afab Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Thu, 20 Oct 2016 12:58:16 +0530 Subject: snapshot: Fix the failure to recreate clones with same name The brick path of snapshot clones contained the clonename, thereby failing to create newer clones with the same name after the original clone had been deleted. This fix creates the brick path with the clone's vol id instead of the clones name. Hence future clones with the same name will not have the namespace clash. Change-Id: I262712adc576122f051b5d1ce171d020efaefd1a BUG: 1387160 Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/15683 Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Rajesh Joseph --- tests/basic/volume-snapshot-clone.t | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/basic') diff --git a/tests/basic/volume-snapshot-clone.t b/tests/basic/volume-snapshot-clone.t index 7c0ec7e0f5a..5348582a22e 100755 --- a/tests/basic/volume-snapshot-clone.t +++ b/tests/basic/volume-snapshot-clone.t @@ -96,6 +96,19 @@ EXPECT_WITHIN $PROBE_TIMEOUT 2 peer_count; EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Started' volinfo_field ${V0}_clone 'Status'; EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Started' volinfo_field ${V1}_clone 'Status'; + +TEST $CLI_1 volume stop ${V0}_clone +TEST $CLI_1 volume stop ${V1}_clone + +TEST $CLI_1 volume delete ${V0}_clone +TEST $CLI_1 volume delete ${V1}_clone + +TEST $CLI_1 snapshot clone ${V0}_clone ${V0}_snap +TEST $CLI_1 snapshot clone ${V1}_clone ${V1}_snap + +EXPECT 'Created' volinfo_field ${V0}_clone 'Status'; +EXPECT 'Created' volinfo_field ${V1}_clone 'Status'; + #Clean up stop_force_volumes 2 EXPECT_WITHIN $CONFIG_UPDATE_TIMEOUT 'Stopped' volinfo_field $V0 'Status'; -- cgit