Bug 1275525

Summary: snap-max-hard-limit for snapshots always shows as 256 in info file.
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Shashank Raj <sraj>
Component: snapshotAssignee: Avra Sengupta <asengupt>
Status: CLOSED ERRATA QA Contact: storage-qa-internal <storage-qa-internal>
Severity: high Docs Contact:
Priority: high    
Version: rhgs-3.1CC: asengupt, asrivast, byarlaga, rhs-bugs, rjoseph, sashinde, storage-qa-internal
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.1.2   
Hardware: x86_64   
OS: Linux   
Whiteboard: SNAPSHOT
Fixed In Version: glusterfs-3.7.5-7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1275616 (view as bug list) Environment:
Last Closed: 2016-03-01 05:45: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: 1260783, 1275616, 1277390    

Description Shashank Raj 2015-10-27 07:36:32 UTC
Description of problem:
Creating a snapshot doesn't inherit the snap-max-hard-limit of the volume and always shows as 256.


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

How reproducible:
Always

Steps to Reproduce:
1.Create and start a volume.
2.Set the snap-max-hard-limit for the volume as 100

Volume : testvolume
snap-max-hard-limit : 100
Effective snap-max-hard-limit : 100
Effective snap-max-soft-limit : 20 (20%)

3.Create a snapshot of the volume and observe that in info file under /var/lib/glusterd/snaps/snap-name/snap-id/info, the snap-max-hard-limit is shown as 256.

4.Because of this the clone which is created out of this snapshot gets the snap-max-hard-limit as 256 as well.

Actual results:

Creating a snapshot doesn't inherit the snap-max-hard-limit of the volume and always shows as 256.

Expected results:

Snapshot info file should show the same snp-max-hard-limit as set for the volume.


Additional info:

Comment 3 Avra Sengupta 2015-10-28 09:09:46 UTC
Fix sent for master (upstream). http://review.gluster.org/#/c/12437/

Comment 4 Avra Sengupta 2015-11-03 08:57:06 UTC
Master URL: http://review.gluster.org/#/c/12437/
Release 3.7 URL : http://review.gluster.org/#/c/12492/
RHGS 3.1.2 URL : https://code.engineering.redhat.com/gerrit/#/c/60677/

Comment 5 Shashank Raj 2015-11-24 09:41:00 UTC
Verified this bug with glusterfs-3.7.5-7 and its working as expected.

If we set the snap-max-hard-limit of the volume to some value say 20

Volume : testvolume
snap-max-hard-limit : 20
Effective snap-max-hard-limit : 20
Effective snap-max-soft-limit : 18 (90%)

and create a snapshot of this volume, the info file under /var/lib/glusterd/snaps/snap-name/snap-id/ shows the correct value of snap-max-hard-limit and it takes the value from its corresponding volume.

Similarly, if we create a clone from this snapshot, the cloned volume takes the snap-max-hard-limit's value from the snapshot's value and can be seen proper in the info file under /var/lib/glusterd/vols/clone-name.

Since this is working as expected, marking this bug as Verified.

Comment 7 errata-xmlrpc 2016-03-01 05:45: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/RHBA-2016-0193.html