Bug 1144978

Summary: glusterd operating version falls back to the operating version of an invalid friend
Product: [Community] GlusterFS Reporter: Kaushal <kaushal>
Component: glusterdAssignee: Kaushal <kaushal>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.6.0CC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.6.0beta2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1109741 Environment:
Last Closed: 2014-11-11 08:39:32 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: 1109741    
Bug Blocks: 1117822    

Description Kaushal 2014-09-22 07:27:13 UTC
+++ This bug was initially created as a clone of Bug #1109741 +++

Description of problem:
During glusterd handshake if one of the glusterd has a lower operating version we move the entire cluster operating version to the lower value irrespective whether the new glusterd is a valid friend or not.


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


How reproducible:
Always


Steps to Reproduce:
1. Create a cluster of two or more node. (The op-version of the cluster should be 4 or less)
2. Clean everything (including peer details) from one node and re-install latest glusterd on this node having op-version 30600.
3. Start glusterd on this node.

Actual results:
Logs and glusterd.info file will show that the cluster op-version is 4. And peer status will not show other nodes on the new node.


Expected results:
op-version should only be changed if we are accepting the node in the cluster.


Additional info:

During glusterd start I am seeing this log:

[2014-06-16 09:36:57.718526] I [glusterd-store.c:1936:glusterd_restore_op_version] 0-glusterd: retrieved op-version: 30600
...
[2014-06-16 09:36:58.029183] I [glusterd-handshake.c:985:__glusterd_mgmt_hndsk_versions_ack] 0-management: using the op-version 4

--- Additional comment from Anand Avati on 2014-06-20 15:42:04 IST ---

REVIEW: http://review.gluster.org/8126 (glusterd: Authenticate management handshake requests) posted (#1) for review on master by Kaushal M (kaushal)

--- Additional comment from Anand Avati on 2014-08-19 15:21:39 IST ---

REVIEW: http://review.gluster.org/8126 (glusterd: Authenticate management handshake requests) posted (#2) for review on master by Kaushal M (kaushal)

--- Additional comment from Anand Avati on 2014-08-26 13:08:56 IST ---

REVIEW: http://review.gluster.org/8126 (glusterd: Authenticate management handshake requests) posted (#3) for review on master by Kaushal M (kaushal)

--- Additional comment from Anand Avati on 2014-09-22 11:43:55 IST ---

REVIEW: http://review.gluster.org/8126 (glusterd: Authenticate management handshake requests) posted (#4) for review on master by Kaushal M (kaushal)

Comment 1 Anand Avati 2014-09-23 10:50:06 UTC
REVIEW: http://review.gluster.org/8819 (glusterd: Authenticate management handshake requests) posted (#1) for review on release-3.6 by Kaushal M (kaushal)

Comment 2 Anand Avati 2014-09-24 07:00:32 UTC
COMMIT: http://review.gluster.org/8819 committed in release-3.6 by Vijay Bellur (vbellur) 
------
commit b0f98446d5b465c3fc88569396fe3c6b5793aed5
Author: Kaushal M <kaushal>
Date:   Thu Jun 19 15:31:46 2014 +0530

    glusterd: Authenticate management handshake requests
    
    Backport of
      371bb42 glusterd: Authenticate management handshake requests
    from master.
    
    Management handshake requests, which are used to validate op-version
    supported by the peers, are now only allowed if,
    - the glusterd doesn't have any other peer, or
    - the request was sent by another peer.
    
    This prevents the op-version of a peer being changed because of a
    connection attempt by an invalid peer.
    
    BUG: 1144978
    Change-Id: I5a909dad37e9873efe8b75dad41b7af71ce91c3d
    Signed-off-by: Kaushal M <kaushal>
    Reviewed-on: http://review.gluster.org/8819
    Reviewed-by: Atin Mukherjee <amukherj>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 3 Niels de Vos 2014-09-25 08:27:35 UTC
A beta release for GlusterFS 3.6.0 has been released. Please verify if the release solves this bug report for you. In case the glusterfs-3.6.0beta2 release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED.

Packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an "updates-testing" repository) infrastructure for your distribution.

[1] http://supercolony.gluster.org/pipermail/gluster-users/2014-September/018883.html
[2] http://supercolony.gluster.org/pipermail/gluster-users/

Comment 4 Niels de Vos 2014-11-11 08:39:32 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.6.1, please reopen this bug report.

glusterfs-3.6.1 has been announced [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://supercolony.gluster.org/pipermail/gluster-users/2014-November/019410.html
[2] http://supercolony.gluster.org/mailman/listinfo/gluster-users