Bug 1231080

Summary: Snapshot: When soft limit is reached, auto-delete is enable, create snapshot doesn't logs anything in log files
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Anil Shah <ashah>
Component: snapshotAssignee: Avra Sengupta <asengupt>
Status: CLOSED ERRATA QA Contact: Anil Shah <ashah>
Severity: high Docs Contact:
Priority: unspecified    
Version: rhgs-3.1CC: annair, asengupt, asrivast, byarlaga, rhs-bugs, rjoseph, storage-qa-internal
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: RHGS 3.1.1   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.7.1-13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1255310 (view as bug list) Environment:
Last Closed: 2015-10-05 07:11:28 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1223636, 1251815, 1255310, 1255311    

Description Anil Shah 2015-06-12 06:57:30 UTC
Description of problem:

When soft-limit is reached, and auto-delete is enable, you try to create snapshot , its delete the first snapshot and creates new snapshot. But nothing is being logged in logs

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

[root@darkknightrises bricks]# rpm -qa | grep glusterfs
glusterfs-libs-3.7.1-1.el6rhs.x86_64
glusterfs-fuse-3.7.1-1.el6rhs.x86_64
glusterfs-server-3.7.1-1.el6rhs.x86_64
glusterfs-3.7.1-1.el6rhs.x86_64
glusterfs-api-3.7.1-1.el6rhs.x86_64
glusterfs-cli-3.7.1-1.el6rhs.x86_64
glusterfs-geo-replication-3.7.1-1.el6rhs.x86_64
glusterfs-client-xlators-3.7.1-1.el6rhs.x86_64
glusterfs-debuginfo-3.7.1-1.el6rhs.x86_64

How reproducible:

100%

Steps to Reproduce:
1. Create 2*2 distribute-replicate volume
2. enable auto-delete, set soft-limit and hard-limit on volume
3. Create some snapshots so that  max soft-limit is reached
4. Once you create snapshot, it will delete the first snapshot and create new snapshot.

Actual results:

When snapshot is delete and created , nothing is been logged in logs

Expected results:

Delete snapshot and create snapshot should be logged in logs

Additional info:

[root@darkknightrises bricks]# gluster snapshot config

Snapshot System Configuration:
snap-max-hard-limit : 256
snap-max-soft-limit : 50%
auto-delete : enable
activate-on-create : disable

Snapshot Volume Configuration:

Volume : snapvol
snap-max-hard-limit : 10
Effective snap-max-hard-limit : 10
Effective snap-max-soft-limit : 5 (50%)

Volume : vol
snap-max-hard-limit : 256
Effective snap-max-hard-limit : 256
Effective snap-max-soft-limit : 128 (50%)

[root@darkknightrises bricks]# gluster v info snapvol
 
Volume Name: snapvol
Type: Distributed-Replicate
Volume ID: 961b2621-cd36-4412-9620-8f74bb70a5db
Status: Started
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: 10.70.33.214:/rhs/brick1/b1
Brick2: 10.70.33.219:/rhs/brick1/b2
Brick3: 10.70.33.225:/rhs/brick1/b3
Brick4: 10.70.44.13:/rhs/brick1/b4
Options Reconfigured:
features.barrier: disable
performance.readdir-ahead: on
snap-max-soft-limit: 50
auto-delete: enable

Comment 4 Avra Sengupta 2015-08-20 09:25:55 UTC
Upstream patch at http://review.gluster.org/#/c/11963/

Comment 6 Anil Shah 2015-08-28 09:58:41 UTC
[root@knightandday ~]# gluster snapshot config

Snapshot System Configuration:
snap-max-hard-limit : 256
snap-max-soft-limit : 20%
auto-delete : enable
activate-on-create : disable

Snapshot Volume Configuration:

Volume : testvol
snap-max-hard-limit : 256
Effective snap-max-hard-limit : 256
Effective snap-max-soft-limit : 51 (20%)


Able to see log in glusterd logs once soft limit is reached.

[2015-08-28 15:31:12.425410] W [MSGID: 106112] [glusterd-snapshot.c:7713:glusterd_handle_snap_limit] 0-management: Soft-limit (value = 51) of volume testvol is reached. Deleting snapshot Scheduled-test-testvol_GMT-2015.08.26-19.44.01

Bug verified on build glusterfs-3.7.1-13.el7rhgs.x86_64

Comment 8 errata-xmlrpc 2015-10-05 07:11:28 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.

https://rhn.redhat.com/errata/RHSA-2015-1845.html