Bug 1086145 - [SNAPSHOT]: Stale entries of snapshots needs to be cleaned from /var/run/gluster/snaps/
Summary: [SNAPSHOT]: Stale entries of snapshots needs to be cleaned from /var/run/glus...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: snapshot
Version: rhgs-3.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: RHGS 3.0.0
Assignee: Avra Sengupta
QA Contact: Rahul Hinduja
URL:
Whiteboard: SNAPSHOT
Depends On:
Blocks: 1101463 1104635
TreeView+ depends on / blocked
 
Reported: 2014-04-10 08:41 UTC by Rahul Hinduja
Modified: 2016-09-17 12:52 UTC (History)
6 users (show)

Fixed In Version: glusterfs-3.6.0.17-1.el6rhs
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1101463 (view as bug list)
Environment:
Last Closed: 2014-09-22 19:35:25 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2014:1278 0 normal SHIPPED_LIVE Red Hat Storage Server 3.0 bug fix and enhancement update 2014-09-22 23:26:55 UTC

Description Rahul Hinduja 2014-04-10 08:41:13 UTC
Description of problem:
=======================

When a snapshot is created, it creates the entry in /var/run/gluster/snaps/ but when the snapshot is deleted the entry is not removed.

System has 10 snapshots:

[root@snapshot-09 ~]# gluster snapshot list | wc
     10      10      61

Number of entries are also 10:

[root@snapshot-09 ~]# ls /var/run/gluster/snaps/ | wc
     10      10     330

Now deleted 2 snaps, the number of total snaps are now 8 :

[root@snapshot-09 ~]# gluster snapshot delete snap1
Deleting snap will erase all the information about the snap. Do you still want to continue? (y/n) y
snapshot delete: snap1: snap removed successfully
[root@snapshot-09 ~]#
[root@snapshot-09 ~]# gluster snapshot delete snap2
Deleting snap will erase all the information about the snap. Do you still want to continue? (y/n) y
snapshot delete: snap2: snap removed successfully
[root@snapshot-09 ~]# 
[root@snapshot-09 ~]# gluster snapshot list | wc
      8       8      49
[root@snapshot-09 ~]# 

But the number of entries in /var/run/gluster/snaps remain same 10.

[root@snapshot-09 ~]# ls /var/run/gluster/snaps/ | wc
     10      10     330
[root@snapshot-09 ~]# 



Version-Release number of selected component (if applicable):
=============================================================

glusterfs-3.4.1.7.snap.mar27.2014git-1.el6.x86_64


How reproducible:
=================
1/1


Steps to Reproduce:
===================
1. Create few snaps of volume
2. Verify that respective entries are created under /var/run/gluster/snaps/
3. Delete a snap
4. verify that respective entries are not deleted from /var/run/gluster/snaps/

Actual results:
===============

Stale entries are not deleted from /var/run/gluster/snaps/


Expected results:
=================

When a snapshot gets deleted its entry from /var/run/gluster/snaps/ should also delete.

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

Comment 4 Avra Sengupta 2014-05-26 07:23:24 UTC
Fixed with http://review.gluster.org/7128

Comment 5 Rahul Hinduja 2014-05-26 09:09:57 UTC
Hitting the same issue with build: glusterfs-3.6.0.7-1.el6rhs.x86_64 . Steps remain exactly the same.

[root@snapshot13 ~]# rpm -qa | grep glusterfs-3.6.0.7-1.el6rhs
glusterfs-3.6.0.7-1.el6rhs.x86_64
[root@snapshot13 ~]# 

Currently 20 snaps are present in the system
============================================

[root@snapshot13 ~]# gluster snapshot list | wc
     20      20      60
[root@snapshot13 ~]# ls /var/run/gluster/snaps/ | wc
     20      20     660
[root@snapshot13 ~]# 

Delete 3 snaps
==============

[root@snapshot13 ~]# for i in {1..3} ; do gluster --mode=script snapshot delete a$i ; done
snapshot delete: a1: snap removed successfully
snapshot delete: a2: snap removed successfully
snapshot delete: a3: snap removed successfully

List the number of entries again:
=================================
[root@snapshot13 ~]# gluster snapshot list | wc     
17      17      51
[root@snapshot13 ~]# ls /var/run/gluster/snaps/ | wc    
20      20     660
[root@snapshot13 ~]# 


Snaps are deleted but the entries remain in /var/run/gluster/snaps/

Moving the bug to assigned state

Comment 6 ssamanta 2014-06-04 11:32:37 UTC
Removing the blocker after discussing with Engineering Leads.

Comment 9 Rahul Hinduja 2014-06-16 10:08:52 UTC
Verified with build: glusterfs-3.6.0.17-1.el6rhs.x86_64


Creation:
==========
[root@snapshot13 ~]# ls /var/run/gluster/snaps/ | wc
      0       0       0
[root@snapshot13 ~]#

[root@snapshot13 ~]# for i in {1..10}; do gluster snapshot create snap$i vol0 ; done 
snapshot create: success: Snap snap1 created successfully
snapshot create: success: Snap snap2 created successfully
snapshot create: success: Snap snap3 created successfully
snapshot create: success: Snap snap4 created successfully
snapshot create: success: Snap snap5 created successfully
snapshot create: success: Snap snap6 created successfully
snapshot create: success: Snap snap7 created successfully
snapshot create: success: Snap snap8 created successfully
snapshot create: success: Snap snap9 created successfully
snapshot create: success: Snap snap10 created successfully
[root@snapshot13 ~]# df -h  | grep /var/run | wc
     10      50    1070
[root@snapshot13 ~]# ls /var/run/gluster/snaps/  | wc
     10      10     330
[root@snapshot13 ~]# 


Deletion:
==========
[root@snapshot13 ~]# for i in {1..10}; do gluster --mode=script snapshot delete snap$i ; done 
snapshot delete: snap1: snap removed successfully
snapshot delete: snap2: snap removed successfully
snapshot delete: snap3: snap removed successfully
snapshot delete: snap4: snap removed successfully
snapshot delete: snap5: snap removed successfully
snapshot delete: snap6: snap removed successfully
snapshot delete: snap7: snap removed successfully
snapshot delete: snap8: snap removed successfully
snapshot delete: snap9: snap removed successfully
snapshot delete: snap10: snap removed successfully
[root@snapshot13 ~]# 

[root@snapshot13 ~]# df -h  | grep /var/run | wc
      0       0       0
[root@snapshot13 ~]# ls /var/run/gluster/snaps/  | wc
      0       0       0
[root@snapshot13 ~]# 


Moving the bug to verified state.

Comment 11 errata-xmlrpc 2014-09-22 19:35:25 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


Note You need to log in before you can comment on or make changes to this bug.