Bug 920916

Summary: non-ssl sockets perform blocking connect()
Product: [Community] GlusterFS Reporter: krishnan parthasarathi <kparthas>
Component: transportAssignee: krishnan parthasarathi <kparthas>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: aavati, amarts, gluster-bugs, jdarcy, nsathyan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 17:23:16 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: 918917    
Attachments:
Description Flags
Regression test script none

Description krishnan parthasarathi 2013-03-13 04:58:52 UTC
Description of problem:
The socket connect code is blocking. This is undesirable as it would affect QOS of already established connections of the same process.

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

How reproducible:
always

Steps to Reproduce:
Pick a server/node in a cluster and perform the following firewall settings.
1. iptables -N testChain
2. iptables -A INPUT -g testChain
3. iptables -A testChain -p tcp --dport 24007 --syn -j DROP 
4. Try mounting a volume on the above server.

How to remove iptables the iptables rules above:
1. iptables -D INPUT -g testChain
2. iptables -D testChain 1
3. iptables -X testChain
  
Actual results:
The mount command hangs (on connect()).

Expected results:
The mount command should not hang.

Note:
With the firewall settings as prescribed above, the mount is not expected to work. The steps are only aimed to capture the effects of blocking connect call.


Additional info:

Comment 1 krishnan parthasarathi 2013-03-13 06:42:05 UTC
Created attachment 709342 [details]
Regression test script

Comment 2 krishnan parthasarathi 2013-03-14 08:02:40 UTC
The regression test script referred to in comment#1 doesn't do what it was intended for. The script would 'fail' even when the socket is non-blocking. Need to find a way in which we can determine that the epoll thread of the connecting nonblocking client process (be it glusterfs or gluster CLI) is not blocked on connect().

In fact the steps to reproduce is also not useful to verify the correctness/completeness of the fix. Will update the bug once I find a way to test this.

Submitted patch: http://review.gluster.com/4670

Comment 3 Vijay Bellur 2013-03-22 09:08:36 UTC
CHANGE: http://review.gluster.org/4670 (socket: Make non-ssl sockets perform non-blocking connect()) merged in master by Anand Avati (avati)

Comment 4 Anand Avati 2013-04-12 07:21:40 UTC
COMMIT: http://review.gluster.org/4685 committed in release-3.4 by Anand Avati (avati) 
------
commit 432ce7e60fb58d3cbb019ab3159b7d393afaaed6
Author: Niels de Vos <ndevos>
Date:   Wed Apr 10 17:51:37 2013 +0200

    build: really disable fusermount if you say so
    
    There is no logic in configure.ac that provides a $disable_fusermount
    variable. So, use the $enable_fusermount variable instead.
    
    Follow-up-for: http://review.gluster.org/4773
    Change-Id: I81cdbd0045409d0036438d542ca6dc1934f784e4
    BUG: 948205
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: http://review.gluster.org/4803
    Reviewed-by: Kaleb KEITHLEY <kkeithle>
    Reviewed-by: Sachidananda Urs <sacchi>
    Tested-by: Gluster Build System <jenkins.com>