Bug 1039956

Summary: [SNAPSHOT] : For the same snap, Snap ID listed is different on different nodes
Product: Red Hat Gluster Storage Reporter: senaik
Component: snapshotAssignee: Sachin Pandit <spandit>
Status: CLOSED ERRATA QA Contact: Rahul Hinduja <rhinduja>
Severity: high Docs Contact:
Priority: high    
Version: rhgs-3.0CC: asengupt, nsathyan, rhinduja, rhs-bugs, rjoseph, sdharane, spandit, ssamanta, storage-qa-internal
Target Milestone: ---   
Target Release: RHGS 3.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: SNAPSHOT
Fixed In Version: 3.4.1.snap.jan15.2014 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-22 19:30:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1044476, 1054151    
Bug Blocks:    

Description senaik 2013-12-10 12:20:58 UTC
Description of problem:
======================
For the same snap, different snap IDs are listed when checked from different nodes .  


Version-Release number of selected component (if applicable):
=============================================================
glusterfs 3.4.0.snap.dec03.2013git 


How reproducible:
================
always


Steps to Reproduce:
==================
1.Create a distribute volume with 3 bricks 

2.Take multiple snaps on the volume using 
gluster snapshot create <volume> -n <snap_name> 

3.List the snapshots of a given volume with detail description using
 gluster snapshot list <vol-name> -d”

For the same snap , there are different SNAP ID s listed :

NODE 1 : 
----------
 gluster snapshot list volume1 -d

Volume Name : volume1
Number of snaps taken : 4
Number of snaps available : 252

	Snap Name : snap1
	Snap Time : 2013-12-10 07:07:58
	Snap ID : 7c486f72-3e64-495f-a3ab-504f801e27ed
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : Description not present
	Snap Status : In-use

	Snap Name : snap2
	Snap Time : 2013-12-10 07:37:57
	Snap ID : 55ce99df-9f37-4537-b790-bdba2a567a26
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : Description not present
	Snap Status : In-use

	Snap Name : snap3
	Snap Time : 2013-12-10 09:20:04
	Snap ID : 17ff82ab-b890-4d14-95a7-fb4ed149e02e
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : Description not present
	Snap Status : In-use

	Snap Name : snap4
	Snap Time : 2013-12-10 09:26:43
	Snap ID : cacd5a0c-bb4d-44db-a5dc-b4ceb2843524
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : this is a snap of volume1
	Snap Status : In-use
======================================================
NODE 2 :
--------

gluster snapshot list volume1 -d

Volume Name : volume1
Number of snaps taken : 4
Number of snaps available : 252

	Snap Name : snap1
	Snap Time : 2013-12-10 07:07:56
	Snap ID : e1a2ef0b-c4e6-43fb-ab81-1749dd5b0923
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : Description not present
	Snap Status : In-use

	Snap Name : snap2
	Snap Time : 2013-12-10 07:37:55
	Snap ID : 307c4b19-1bac-4073-9af7-6e740455f414
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : Description not present
	Snap Status : In-use

	Snap Name : snap3
	Snap Time : 2013-12-10 09:20:02
	Snap ID : 67d036ea-e48d-425b-906c-c9696ce8a5e3
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : Description not present
	Snap Status : In-use

	Snap Name : snap4
	Snap Time : 2013-12-10 09:26:41
	Snap ID : 9f72db9b-92a9-4b2f-958c-a0f8631e43a9
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : this is a snap of volume1
	Snap Status : In-use

=============================================================
NODE 3 : 
-------

 gluster snapshot list volume1 -d

Volume Name : volume1
Number of snaps taken : 4
Number of snaps available : 252

	Snap Name : snap1
	Snap Time : 2013-12-10 07:07:57
	Snap ID : 24c31b9e-4e8f-4217-9fd2-32e5505d18fb
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : Description not present
	Snap Status : In-use

	Snap Name : snap2
	Snap Time : 2013-12-10 07:37:56
	Snap ID : 3c22c135-35a8-4aaa-b909-1ffe829f9f4a
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : Description not present
	Snap Status : In-use

	Snap Name : snap3
	Snap Time : 2013-12-10 09:20:03
	Snap ID : 4fcb3e73-e7e4-4cac-a8a9-c46e686bcd49
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : Description not present
	Snap Status : In-use

	Snap Name : snap4
	Snap Time : 2013-12-10 09:26:42
	Snap ID : 581ec99b-d390-4d89-90f6-406aa7c26e61
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : this is a snap of volume1
	Snap Status : In-use

=========================================================

Actual results:
===============
Snap ID is different for the same snap when listed from different nodes 


Expected results:
=================
It is misleading for the user to see different Snap ID s on different nodes for the same snap . Needs a discussion to understand if we can display the Volume ID to which the snap is associated instead of different SNAP ID s from different nodes. 


Additional info:

Comment 3 Sachin Pandit 2013-12-30 07:33:21 UTC
Snap UUID was different when listed from different node, The reason for that 
behaviour was, we used to generate a new UUID for snaps in each node and copy that to snap_uuid. Now we are copying the snap volume id of the snap to snap uuid,
so that we can make the snap UUID same across nodes.

Comment 4 senaik 2013-12-30 13:09:47 UTC
Version : glusterfs 3.4.0.snap.dec30.2013git
=======

On a distribute volume and distribute replicate volume, Snap ID is same across all the nodes for the same snap.

But after restarting glusterd , the number of snaps listed is shown as 'zero' . This issue is tracked by https://bugzilla.redhat.com/show_bug.cgi?id=1044476

Marking this bug as a dependent of BZ#1044476, since while verifying this bug QE would like to test if the SNAP ID remains the same after restarting glusterd as well . 

Node 1: 
=======
gluster snapshot list volume2 -d

Volume Name : volume2
Number of snaps taken : 3
Number of snaps available : 253

	Snap Name : SNAP1
	Snap Time : 2013-12-30 11:25:18
	Snap ID : 73df9768-1c69-48a5-803e-e8a0b4a6957f
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : Description not present
	Snap Status : In-use

	Snap Name : SNAP2
	Snap Time : 2013-12-30 11:25:28
	Snap ID : 7ddb5e77-6ad5-48bd-b3d7-6afb3fafbc5f
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : Description not present
	Snap Status : In-use

	Snap Name : SNAP3
	Snap Time : 2013-12-30 11:25:37
	Snap ID : 4c92b6e0-eb8d-4c32-9b53-0a543c3afbc4
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : Description not present
	Snap Status : In-use
[root@snapshot-03 brick7]# service glusterd restart
Starting glusterd:                                         [  OK  ]
[root@snapshot-03 brick7]# gluster snapshot list volume2 -d

Volume Name : volume2
Number of snaps taken : 0
Number of snaps available : 256

NODE 2 : 
=======
 gluster snapshot list volume2 -d

Volume Name : volume2
Number of snaps taken : 3
Number of snaps available : 253

	Snap Name : SNAP1
	Snap Time : 2013-12-30 11:25:17
	Snap ID : 73df9768-1c69-48a5-803e-e8a0b4a6957f
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : Description not present
	Snap Status : In-use

	Snap Name : SNAP2
	Snap Time : 2013-12-30 11:25:28
	Snap ID : 7ddb5e77-6ad5-48bd-b3d7-6afb3fafbc5f
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : Description not present
	Snap Status : In-use

	Snap Name : SNAP3
	Snap Time : 2013-12-30 11:25:36
	Snap ID : 4c92b6e0-eb8d-4c32-9b53-0a543c3afbc4
	CG Name : Does not exist
	CG ID : Does not exist
	Snap Description : Description not present
	Snap Status : In-use
[root@snapshot-01 volume2]# service glusterd restart
Starting glusterd:                                         [  OK  ]
[root@snapshot-01 volume2]# gluster snapshot list volume2 -d

Volume Name : volume2
Number of snaps taken : 0
Number of snaps available : 256

Comment 5 Rahul Hinduja 2014-01-17 12:47:01 UTC
with build: 3.4.1.snap.jan15.2014

Node1:
======

[root@snapshot-01 ~]# gluster snap list vol3 -d

Volume Name                  : vol3
Number of snaps taken        : 2
Number of snaps available    : 254

	Snap Name         : n1
	Snap Time         : 2014-01-17 11:10:10
	Snap UUID         : b57cb17d-3a30-4e86-93c2-4f6d2e73b15f
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Description not present
	Snap Status       : In-use

	Snap Name         : n2
	Snap Time         : 2014-01-17 11:10:17
	Snap UUID         : 4ed50af7-f6a3-4254-b9f5-ee4b85657331
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Description not present
	Snap Status       : In-use
[root@snapshot-01 ~]# 
[root@snapshot-01 ~]# 
[root@snapshot-01 ~]# 
[root@snapshot-01 ~]# service glusterd restart
Starting glusterd:                                         [  OK  ]
[root@snapshot-01 ~]# 
[root@snapshot-01 ~]# 
[root@snapshot-01 ~]# gluster snap list vol3 -d

Volume Name                  : vol3
Number of snaps taken        : 2
Number of snaps available    : 254

	Snap Name         : n1
	Snap Time         : 1970-01-01 05:30:00
	Snap UUID         : b57cb17d-3a30-4e86-93c2-4f6d2e73b15f
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Description not present
	Snap Status       : In-use

	Snap Name         : n2
	Snap Time         : 1970-01-01 05:30:00
	Snap UUID         : 4ed50af7-f6a3-4254-b9f5-ee4b85657331
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Description not present
	Snap Status       : In-use
[root@snapshot-01 ~]# 


Node2:
======

[root@snapshot-02 ~]# gluster snap list vol3 -d

Volume Name                  : vol3
Number of snaps taken        : 2
Number of snaps available    : 254

	Snap Name         : n1
	Snap Time         : 2014-01-17 11:10:11
	Snap UUID         : b57cb17d-3a30-4e86-93c2-4f6d2e73b15f
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Description not present
	Snap Status       : In-use

	Snap Name         : n2
	Snap Time         : 2014-01-17 11:10:18
	Snap UUID         : 4ed50af7-f6a3-4254-b9f5-ee4b85657331
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Description not present
	Snap Status       : In-use
[root@snapshot-02 ~]# 
[root@snapshot-02 ~]# 
[root@snapshot-02 ~]# 
[root@snapshot-02 ~]# service glusterd restart
Starting glusterd:                                         [  OK  ]
[root@snapshot-02 ~]# 
[root@snapshot-02 ~]# 
[root@snapshot-02 ~]# gluster snap list vol3 -d

Volume Name                  : vol3
Number of snaps taken        : 2
Number of snaps available    : 254

	Snap Name         : n1
	Snap Time         : 1970-01-01 05:30:00
	Snap UUID         : b57cb17d-3a30-4e86-93c2-4f6d2e73b15f
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Description not present
	Snap Status       : In-use

	Snap Name         : n2
	Snap Time         : 1970-01-01 05:30:00
	Snap UUID         : 4ed50af7-f6a3-4254-b9f5-ee4b85657331
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Description not present
	Snap Status       : In-use
[root@snapshot-02 ~]# 


Node3:
======

[root@snapshot-03 ~]# gluster snap list vol3 -d

Volume Name                  : vol3
Number of snaps taken        : 2
Number of snaps available    : 254

	Snap Name         : n1
	Snap Time         : 2014-01-17 11:10:12
	Snap UUID         : b57cb17d-3a30-4e86-93c2-4f6d2e73b15f
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Description not present
	Snap Status       : In-use

	Snap Name         : n2
	Snap Time         : 2014-01-17 11:10:18
	Snap UUID         : 4ed50af7-f6a3-4254-b9f5-ee4b85657331
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Description not present
	Snap Status       : In-use
[root@snapshot-03 ~]# 
[root@snapshot-03 ~]# 
[root@snapshot-03 ~]# 
[root@snapshot-03 ~]# service glusterd restart
Starting glusterd:                                         [  OK  ]
[root@snapshot-03 ~]# 
[root@snapshot-03 ~]# 
[root@snapshot-03 ~]# gluster snap list vol3 -d

Volume Name                  : vol3
Number of snaps taken        : 2
Number of snaps available    : 254

	Snap Name         : n1
	Snap Time         : 1970-01-01 05:30:00
	Snap UUID         : b57cb17d-3a30-4e86-93c2-4f6d2e73b15f
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Description not present
	Snap Status       : In-use

	Snap Name         : n2
	Snap Time         : 1970-01-01 05:30:00
	Snap UUID         : 4ed50af7-f6a3-4254-b9f5-ee4b85657331
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Description not present
	Snap Status       : In-use
[root@snapshot-03 ~]# 


Node4:
======

[root@snapshot-04 ~]# gluster snap list vol3 -d

Volume Name                  : vol3
Number of snaps taken        : 2
Number of snaps available    : 254

	Snap Name         : n1
	Snap Time         : 2014-01-17 11:10:12
	Snap UUID         : b57cb17d-3a30-4e86-93c2-4f6d2e73b15f
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Description not present
	Snap Status       : In-use

	Snap Name         : n2
	Snap Time         : 2014-01-17 11:10:18
	Snap UUID         : 4ed50af7-f6a3-4254-b9f5-ee4b85657331
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Description not present
	Snap Status       : In-use
[root@snapshot-04 ~]# 
[root@snapshot-04 ~]# 
[root@snapshot-04 ~]# 
[root@snapshot-04 ~]# service glusterd restart
Starting glusterd:                                         [  OK  ]
[root@snapshot-04 ~]# 
[root@snapshot-04 ~]# 
[root@snapshot-04 ~]# gluster snap list vol3 -d

Volume Name                  : vol3
Number of snaps taken        : 2
Number of snaps available    : 254

	Snap Name         : n1
	Snap Time         : 1970-01-01 05:30:00
	Snap UUID         : b57cb17d-3a30-4e86-93c2-4f6d2e73b15f
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Description not present
	Snap Status       : In-use

	Snap Name         : n2
	Snap Time         : 1970-01-01 05:30:00
	Snap UUID         : 4ed50af7-f6a3-4254-b9f5-ee4b85657331
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Description not present
	Snap Status       : In-use
[root@snapshot-04 ~]# 



UUID across the nodes even after restarting ofglusterd, remain same. But the Snap Time changes to epoch time which is tracked in bz 1054151. Hence keeping it open and marking dependent on 1054151

Comment 7 Avra Sengupta 2014-03-24 11:42:28 UTC
Fixed with http://review.gluster.org/#/c/7123/21

Comment 8 senaik 2014-03-26 12:31:04 UTC
Version : glusterfs 3.4.1.6.snap.mar25.2014
=======
With the new snap driven changes, snapshot list will only list snapshots & snapshot info will give details about the snapshot.Hence the Snap UUID will now be shown with 'gluster snapshot info' command 

On all the nodes for the same snap, SNAP UUID remains the same (after restarting glusterd also)


gluster snapshot info snap_vol1_1
Snapshot                  : snap_vol1_1
Snap UUID                 : d45ccab8-8b06-4472-87e6-f329fa2322de
Created                   : 2014-03-26 09:07:23
Snap Volumes:

	Snap Volume Name          : 4811847d69e64eab98a78a7d39841390
	Origin Volume name        : vol1
	Snaps taken for vol1      : 10
	Snaps available for vol1  : 246
	Status                    : Started



gluster snapshot info volume vol1
Volume Name               : vol1
Snaps Taken               : 10
Snaps Available           : 246
	Snapshot                  : snap_vol1_1
	Snap UUID                 : d45ccab8-8b06-4472-87e6-f329fa2322de
	Created                   : 2014-03-26 09:07:23
	Status                    : Started
 
	Snapshot                  : snap_vol1_2
	Snap UUID                 : 14636ecb-238e-49bb-974a-4ddc817b0a89
	Created                   : 2014-03-26 09:07:29
	Status                    : Started



After restarting glusterd, check 'gluster snapshot info' again from all the nodes


gluster snapshot info snap_vol1_1
Snapshot                  : snap_vol1_1
Snap UUID                 : d45ccab8-8b06-4472-87e6-f329fa2322de
Created                   : 2014-03-26 09:07:23
Snap Volumes:

	Snap Volume Name          : 4811847d69e64eab98a78a7d39841390
	Origin Volume name        : vol1
	Snaps taken for vol1      : 10
	Snaps available for vol1  : 246
	Status                    : Started




gluster snapshot info volume vol1
Volume Name               : vol1
Snaps Taken               : 10
Snaps Available           : 246
	Snapshot                  : snap_vol1_1
	Snap UUID                 : d45ccab8-8b06-4472-87e6-f329fa2322de
	Created                   : 2014-03-26 09:07:23
	Status                    : Started
 
	Snapshot                  : snap_vol1_2
	Snap UUID                 : 14636ecb-238e-49bb-974a-4ddc817b0a89
	Created                   : 2014-03-26 09:07:29
	Status                    : Started


For the same snap, SNAP UUID remains same across all the nodes. 

Marking the bug as 'Verified'

Comment 9 Nagaprasad Sathyanarayana 2014-04-21 06:18:01 UTC
Marking snapshot BZs to RHS 3.0.

Comment 10 Nagaprasad Sathyanarayana 2014-05-19 10:56:37 UTC
Setting flags required to add BZs to RHS 3.0 Errata

Comment 13 errata-xmlrpc 2014-09-22 19:30:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2014-1278.html