Description of problem: ======================= From user readability and script parsing the output when user tries to set snap-max-hard-limit to greater value than the allowed, the output needs a space " " in between the snap-max-hard-limit and value. Current Example: ================ [root@snapshot-09 ~]# gluster snapshot config vol1 snap-max-hard-limit 100 Changing snapshot-max-hard-limit will lead to deletion of snapshots if they exceed the new limit. Do you want to continue? (y/n) y Snapshot Config : failed: Invalid snap-max-hard-limit100. Expected range 0 - 75 Snapshot command failed Should be: ========== [root@snapshot-09 ~]# gluster snapshot config vol1 snap-max-hard-limit 100 Changing snapshot-max-hard-limit will lead to deletion of snapshots if they exceed the new limit. Do you want to continue? (y/n) y Snapshot Config : failed: Invalid snap-max-hard-limit 100. Expected range 0 - 75 Snapshot command failed 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. Set the snap-max-hard-limit to higher value (300) Actual results: =============== Snapshot Config : failed: Invalid snap-max-hard-limit300. Expected range 0 - 75 Expected results: ================= Snapshot Config : failed: Invalid snap-max-hard-limit 300. Expected range 0 - 75
Marking snapshot BZs to RHS 3.0.
The patch which fixes this bug can be found in http://review.gluster.org/#/c/7457/
Reopening this bug to address other set of similar issues (a) When we set a volume limit which is greater than the default 256, it shows proper message as follows: [root@snapshot09 ~]# gluster snapshot config vol1 snap-max-hard-limit 300 snap-max-hard-limit value cannot be more than 256 Usage: snapshot config [volname] [snap-max-hard-limit <count>] [snap-max-soft-limit <percent>] (b) Now set the system limit to 200 lesser than default 256, and than try to set the volume limit greater than 256, it fails still complaining the max limit to 256 [root@snapshot09 ~]# gluster snapshot config snap-max-hard-limit 200 Changing snapshot-max-hard-limit will lead to deletion of snapshots if they exceed the new limit. Do you want to continue? (y/n) y snapshot config: System for snap-max-hard-limit set successfully [root@snapshot09 ~]# [root@snapshot09 ~]# gluster snapshot config vol1 snap-max-hard-limit 300 snap-max-hard-limit value cannot be more than 256 Usage: snapshot config [volname] [snap-max-hard-limit <count>] [snap-max-soft-limit <percent>] (c) Since it complained in step b for 256, try to set the value to 250 which is lesser than 256 but greater than system set value 200. It eventually fails with the proper range. [root@snapshot09 ~]# gluster snapshot config vol1 snap-max-hard-limit 250 Changing snapshot-max-hard-limit will lead to deletion of snapshots if they exceed the new limit. Do you want to continue? (y/n) y Snapshot Config : failed: Invalid snap-max-hard-limit 250. Expected range 1 - 200 Snapshot command failed So here, we are unnecessary checking two lever whereas we should just check the effective hard limit for a volume and fail with the range. Reopening the bug
A patch which fixes this bug has beeb posted upstream, I'll send a relevant patch downstream once upstream patch gets merged.
Patch which fixes this has been posted downstream, https://bugzilla.redhat.com/show_bug.cgi?id=1083024 is the link to that.
[root@darkknightrises ~]# gluster snapshot config snap-max-hard-limit 200 Changing snapshot-max-hard-limit will limit the creation of new snapshots if they exceed the new limit. Do you want to continue? (y/n) y snapshot config: snap-max-hard-limit for System set successfully [root@darkknightrises ~]# gluster snapshot config snapvol snap-max-hard-limit 300 Changing snapshot-max-hard-limit will limit the creation of new snapshots if they exceed the new limit. Do you want to continue? (y/n) y Snapshot Config : failed: Invalid snap-max-hard-limit 300. Expected range 1 - 200 Snapshot command failed [root@darkknightrises ~]# gluster snapshot config snapvol snap-max-hard-limit 250 Changing snapshot-max-hard-limit will limit the creation of new snapshots if they exceed the new limit. Do you want to continue? (y/n) y Snapshot Config : failed: Invalid snap-max-hard-limit 250. Expected range 1 - 200 Snapshot command failed Bug verified on build glusterfs-server-3.7.1-2.el6
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-1495.html