Bug 1313206

Summary: Encrypted rpc clients do not reconnect sometimes
Product: [Community] GlusterFS Reporter: Kaushal <kaushal>
Component: rpcAssignee: Kaushal <kaushal>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: amukherj, bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.8rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1314641 (view as bug list) Environment:
Last Closed: 2016-06-16 13:58:44 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: 1310740, 1314641    

Description Kaushal 2016-03-01 08:14:38 UTC
When encryption is enabled on an rpc client, it can sometimes fail to reconnect.

This happens because, on the first reconnect attempt the underlying transport is freed if connect fails. Further reconnect attempts will not happen as the transport doesn't exist anymore.

This can lead to clusters showing inconsistent peer status information, and not performing correctly when management encryption is enabled.

Comment 1 Vijay Bellur 2016-03-01 08:16:34 UTC
REVIEW: http://review.gluster.org/13554 (socket: Launch socket_poller only if connect succeeded) posted (#1) for review on master by Kaushal M (kaushal)

Comment 2 Vijay Bellur 2016-03-02 15:40:40 UTC
REVIEW: http://review.gluster.org/13554 (socket: Launch socket_poller only if connect succeeded) posted (#2) for review on master by Kaushal M (kaushal)

Comment 3 Vijay Bellur 2016-03-04 04:42:19 UTC
COMMIT: http://review.gluster.org/13554 committed in master by Raghavendra G (rgowdapp) 
------
commit d117466422b2fe97390b9ccc7a3c277e7a64285a
Author: Kaushal M <kaushal>
Date:   Tue Mar 1 13:04:03 2016 +0530

    socket: Launch socket_poller only if connect succeeded
    
    For an encrypted connection, sockect_connect() used to launch
    socket_poller() in it's own thread (ON by default), even if the connect
    failed. This would cause two unrefs to be done on the transport, once in
    socket_poller() and once in socket_connect(), causing the transport to
    be freed and cleaned up. This would cause further reconnect attempts
    from failing as the transport wouldn't be available.
    
    By starting socket_poller() only if connect succeeded, this is avoided.
    
    Change-Id: Ie22090dbb1833bdd0f636a76cb3935d766711917
    BUG: 1313206
    Signed-off-by: Kaushal M <kaushal>
    Reviewed-on: http://review.gluster.org/13554
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Raghavendra G <rgowdapp>

Comment 4 Niels de Vos 2016-06-16 13:58:44 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.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [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://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user