Bug 1101702 - setting lower op-version should throw failure message
Summary: setting lower op-version should throw failure message
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterd
Version: rhgs-3.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: RHGS 3.1.3
Assignee: Satish Mohan
QA Contact: Byreddy
URL:
Whiteboard:
Depends On:
Blocks: 1299184 1315186 1330545
TreeView+ depends on / blocked
 
Reported: 2014-05-27 18:33 UTC by SATHEESARAN
Modified: 2016-06-23 04:52 UTC (History)
7 users (show)

Fixed In Version: glusterfs-3.7.9-3
Doc Type: Bug Fix
Doc Text:
TBD Cause: Consequence: Fix: Result:
Clone Of:
: 1315186 (view as bug list)
Environment:
Last Closed: 2016-06-23 04:52:06 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1240 0 normal SHIPPED_LIVE Red Hat Gluster Storage 3.1 Update 3 2016-06-23 08:51:28 UTC

Description SATHEESARAN 2014-05-27 18:33:49 UTC
Description of problem:
-----------------------
op-version option being introduced with RHS 3.0 to bump-up the op-version.
So the post upgrade, user can bump up the op-version.

While testing the negative case for this op-version, it has the following behavior,
1. If op-version is set to one higher than it operates, the op-version is modified and CLI returns success

2. If op-version is set to lower value, the op-version is not modified but still CLI returns success

Version-Release number of selected component (if applicable):
--------------------------------------------------------------
RHS 3.0 ( glusterfs-3.6.0.8-1.el6rhs )

How reproducible:
-----------------
Always

Steps to Reproduce:
-------------------
1. Set op-version to lower value

Actual results:
---------------
op-version was not modified but CLI returns success

Expected results:
-----------------
CLI should return failure as the option was not modified ( as op-version could only be incremented and never decremented )

Additional info:
----------------
RHS 2.1 U2 operates with op-version 2
RHS 3.0 will be operating at op-version 3

The following was tested on RHS 3.0 Node,

[Tue May 27 23:55:18 UTC 2014 root.37.138:~ ] # gluster volume set all op-version 1
volume set: success

Comment 4 Atin Mukherjee 2016-03-07 11:25:23 UTC
Upstream patch http://review.gluster.org/#/c/13622 posted for review.

Comment 5 Atin Mukherjee 2016-03-22 12:19:41 UTC
The fix is now available in rhgs-3.1.3 branch, hence moving the state to Modified.

Comment 7 SATHEESARAN 2016-03-29 15:38:25 UTC
Tested with RHGS 3.1.3 nightly build ( glusterfs-3.7.9-1.el7rhgs )
Setting the lower op-version throws proper error messages in cli and also in glusterd logs

[root@ ~]# gluster volume set all op-version 30705
volume set: failed: Required op-version (30705) should not be equal or lower than current cluster op-version (30707).

Following is the error messages from glusterd logs


<snip>

[2016-03-29 20:54:28.183415] E [MSGID: 106174] [glusterd-op-sm.c:1157:glusterd_op_stage_set_volume] 0-management: Required op-version (30707) should not be equal or lower than current cluster op-version (30707).
[2016-03-29 20:54:28.183508] E [MSGID: 106301] [glusterd-syncop.c:1281:gd_stage_op_phase] 0-management: Staging of operation 'Volume Set' failed on localhost : Required op-version (30707) should not be equal or lower than current cluster op-version (30707).

</snip>

Comment 8 Byreddy 2016-04-26 05:48:16 UTC
i am reopening this bug because issue re-exist in the current nightly build "glusterfs-3.7.9-2."

[root@dhcp~]# gluster volume set all cluster.op-version 30705
volume set: success
[root@dhcp ~]# 

Moving to assigned state.

Comment 9 Atin Mukherjee 2016-04-26 07:28:00 UTC
http://review.gluster.org/#/c/14069 posted for review in upstream.

Comment 10 Atin Mukherjee 2016-04-27 05:19:46 UTC
Mainline patch   : http://review.gluster.org/14069
3.7 Patch        : http://review.gluster.org/14077
Downstream patch : https://code.engineering.redhat.com/gerrit/#/c/73088

All the patches are merged now.

Comment 11 Atin Mukherjee 2016-04-27 06:23:40 UTC
Here is the RCA:

Commit 2d87a98 (http://review.gluster.org/13622) introduced a validation to fail lowering down the cluster.op-version. Commit 2eb8758 (http://review.gluster.org/5786) actually changed the variable value from cluster's op-version to volume's op-version which resulted the whole logic go for a toss.

Comment 12 Byreddy 2016-05-09 04:06:03 UTC
Verified bug using the build "glusterfs-3.7.9-3".

Fix is working good, It's not allowing to lower the cluster op-version and throwing proper error message.


Changing the state to verified.

Comment 14 Atin Mukherjee 2016-06-02 11:57:58 UTC
We don't need a doc text here.

Comment 17 errata-xmlrpc 2016-06-23 04:52:06 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://access.redhat.com/errata/RHBA-2016:1240


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