<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/rpc/rpc-transport/socket/src, branch round-robin2</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>rpc/socket.c : Modify socket code to avoid fd leak in case of socket_poller thread</title>
<updated>2016-07-20T12:37:39+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawa@redhat.com</email>
</author>
<published>2016-07-15T08:42:31+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d724a87e682cf14a3f2a85888cad5c5db203fb5b'/>
<id>d724a87e682cf14a3f2a85888cad5c5db203fb5b</id>
<content type='text'>
Update socket code to avoid fd leak in case of socket_poller thread.

Change-Id: Ifa9718fbaf065988a299cda7ba0282dfd6b10a32
BUG: 1356888
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14929
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update socket code to avoid fd leak in case of socket_poller thread.

Change-Id: Ifa9718fbaf065988a299cda7ba0282dfd6b10a32
BUG: 1356888
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14929
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc: invalid argument when function setsockopt sets option TCP_USER_TIMEOUT</title>
<updated>2016-07-11T01:59:04+00:00</updated>
<author>
<name>Zhou Zhengping</name>
<email>johnzzpcrystal@gmail.com</email>
</author>
<published>2016-06-23T22:33:16+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=b2c73cbf423de6201f956f522b7429615c88869d'/>
<id>b2c73cbf423de6201f956f522b7429615c88869d</id>
<content type='text'>
If option "transport.tcp-user-timeout" hasn't been setted, glusterd's
priv-&gt;timeout will be -1, which will cause invalid argument when
set TCP_USER_TIMEOUT.

Change-Id: Ibc16264ceac0e69ab4a217ffa27c549b9fa21df9
BUG: 1349657
Signed-off-by: Zhou Zhengping &lt;johnzzpcrystal@gmail.com&gt;
Reviewed-on: http://review.gluster.org/14785
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If option "transport.tcp-user-timeout" hasn't been setted, glusterd's
priv-&gt;timeout will be -1, which will cause invalid argument when
set TCP_USER_TIMEOUT.

Change-Id: Ibc16264ceac0e69ab4a217ffa27c549b9fa21df9
BUG: 1349657
Signed-off-by: Zhou Zhengping &lt;johnzzpcrystal@gmail.com&gt;
Reviewed-on: http://review.gluster.org/14785
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc/socket: pthread resources are not cleaned up</title>
<updated>2016-07-08T20:17:12+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2016-07-08T05:16:46+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=9886d568a7a8839bf3acc81cb1111fa372ac5270'/>
<id>9886d568a7a8839bf3acc81cb1111fa372ac5270</id>
<content type='text'>
A socket_connect failure creates a new pthread which
is not a detached thread. As no pthread_join is called,
the thread resources are not cleaned up causing a memory leak.

Now, socket_connect creates a detached thread to handle failure.

Change-Id: Idbf25d312f91464ae20c97d501b628bfdec7cf0c
BUG: 1343374
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14875
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A socket_connect failure creates a new pthread which
is not a detached thread. As no pthread_join is called,
the thread resources are not cleaned up causing a memory leak.

Now, socket_connect creates a detached thread to handle failure.

Change-Id: Idbf25d312f91464ae20c97d501b628bfdec7cf0c
BUG: 1343374
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14875
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc/socket.c : Modify socket_poller code in case of ENODATA error code.</title>
<updated>2016-07-08T14:39:03+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawa@redhat.com</email>
</author>
<published>2016-06-24T04:28:29+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=84e9fc2fb5fabf9d1e553a420854a306cdb8a168'/>
<id>84e9fc2fb5fabf9d1e553a420854a306cdb8a168</id>
<content type='text'>
Problem:  Polling failure errors are coming till volume is not come while
          SSL is enabled.

Solution: To avoid the message update one condition in socket_poller code
          It will not exit from thread in case of received ENODATA from
          ssl_do function.

Change-Id: Ia514e99b279b07b372ee950f4368ac0d9c702d82
BUG: 1349709
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14786
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  Polling failure errors are coming till volume is not come while
          SSL is enabled.

Solution: To avoid the message update one condition in socket_poller code
          It will not exit from thread in case of received ENODATA from
          ssl_do function.

Change-Id: Ia514e99b279b07b372ee950f4368ac0d9c702d82
BUG: 1349709
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14786
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>socket: log the client identifier in ssl connect</title>
<updated>2016-06-30T22:24:20+00:00</updated>
<author>
<name>Raghavendra Bhat</name>
<email>raghavendra@redhat.com</email>
</author>
<published>2016-05-06T14:03:53+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d308fb5e152d8c908bf4f5da81f553fbe3d0400a'/>
<id>d308fb5e152d8c908bf4f5da81f553fbe3d0400a</id>
<content type='text'>
Change-Id: I4b463ecafb66de16cbe7ed23fae800bb1204f829
BUG: 1333912
Signed-off-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14242
Tested-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I4b463ecafb66de16cbe7ed23fae800bb1204f829
BUG: 1333912
Signed-off-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14242
Tested-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>    rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.</title>
<updated>2016-06-24T13:23:51+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawa@redhat.com</email>
</author>
<published>2016-06-13T07:11:15+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=2ee48474be32f6ead2f3834677fee89d88348382'/>
<id>2ee48474be32f6ead2f3834677fee89d88348382</id>
<content type='text'>
    Problem: Current approach to cleanup threads of socket_poller is not appropriate.

    Solution: Enable detach flag at the time of thread creation in socket_spawn.

    Fix: Write a new wrapper(gf_create_detach_thread) to create detachable thread
         instead of store thread ids in a queue.

    Test: Fix is verfied on gluster process, To test the patch followed below procedure
          Enable the client.ssl and server.ssl option on the volume
          Start the volume and count anon segment in pmap output for glusterd process
          pmap -x &lt;glusterd-pid&gt; | grep "\[ anon \]" | wc -l
          Stop the volume and check again count of anon segment it should not increase.

Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
Change-Id: Ib8f7ec7504ec8f6f74b45ce6719b6fb47f9fdc37
BUG: 1336508
Reviewed-on: http://review.gluster.org/14694
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    Problem: Current approach to cleanup threads of socket_poller is not appropriate.

    Solution: Enable detach flag at the time of thread creation in socket_spawn.

    Fix: Write a new wrapper(gf_create_detach_thread) to create detachable thread
         instead of store thread ids in a queue.

    Test: Fix is verfied on gluster process, To test the patch followed below procedure
          Enable the client.ssl and server.ssl option on the volume
          Start the volume and count anon segment in pmap output for glusterd process
          pmap -x &lt;glusterd-pid&gt; | grep "\[ anon \]" | wc -l
          Stop the volume and check again count of anon segment it should not increase.

Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
Change-Id: Ib8f7ec7504ec8f6f74b45ce6719b6fb47f9fdc37
BUG: 1336508
Reviewed-on: http://review.gluster.org/14694
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc: change client insecure port ceiling from 65535 to 49151</title>
<updated>2016-05-18T10:26:01+00:00</updated>
<author>
<name>Prasanna Kumar Kalever</name>
<email>prasanna.kalever@redhat.com</email>
</author>
<published>2016-05-13T07:47:16+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=58615482ed87ff4b8253081c6ea26471fcf09070'/>
<id>58615482ed87ff4b8253081c6ea26471fcf09070</id>
<content type='text'>
current port allocation to various processes (clumsy):

 1023 - 1       -&gt; client ports range if bind secure is turned on
49151 - 1024    -&gt; fall back to this, if in above case ports exhaust
65535 - 1024    -&gt; client port range if bind insecure is on
49152 - 65535   -&gt; brick port range

now, we have segregated port ranges 0 - 65535 to below 3 ranges

 1023 - 1       -&gt; client ports range if bind secure is turned on
49151 - 1024    -&gt; client port range if bind insecure is on
                   (fall back to this, if in above case ports exhaust)
49152 - 65535   -&gt; brick port range

so now we have a clean segregation of port mapping

Change-Id: Ie3b4e7703e0bbeabbe0adbdd6c60d9ef78ef7c65
BUG: 1335776
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14326
Tested-by: Prasanna Kumar Kalever &lt;pkalever@redhat.com&gt;
Reviewed-by: Raghavendra Talur &lt;rtalur@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
current port allocation to various processes (clumsy):

 1023 - 1       -&gt; client ports range if bind secure is turned on
49151 - 1024    -&gt; fall back to this, if in above case ports exhaust
65535 - 1024    -&gt; client port range if bind insecure is on
49152 - 65535   -&gt; brick port range

now, we have segregated port ranges 0 - 65535 to below 3 ranges

 1023 - 1       -&gt; client ports range if bind secure is turned on
49151 - 1024    -&gt; client port range if bind insecure is on
                   (fall back to this, if in above case ports exhaust)
49152 - 65535   -&gt; brick port range

so now we have a clean segregation of port mapping

Change-Id: Ie3b4e7703e0bbeabbe0adbdd6c60d9ef78ef7c65
BUG: 1335776
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14326
Tested-by: Prasanna Kumar Kalever &lt;pkalever@redhat.com&gt;
Reviewed-by: Raghavendra Talur &lt;rtalur@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>socket: Fix incorrect handling of partial reads</title>
<updated>2016-05-11T11:02:12+00:00</updated>
<author>
<name>Xavier Hernandez</name>
<email>xhernandez@datalab.es</email>
</author>
<published>2016-05-09T10:50:39+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=3286e31509f20fa6e36d5b393a12eaf7ef3a226e'/>
<id>3286e31509f20fa6e36d5b393a12eaf7ef3a226e</id>
<content type='text'>
The usage of function local variables in the protocol state
machine caused an incorrect behaviour when a partial read
from the socket forced the function to return and restart
later when more data was available. At this point the local
variables contained incorrect data.

Change-Id: I4db1f4ef5c46a3d2d7f7c5328e906188c3af49e6
BUG: 1334285
Signed-off-by: Xavier Hernandez &lt;xhernandez@datalab.es&gt;
Reviewed-on: http://review.gluster.org/14270
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The usage of function local variables in the protocol state
machine caused an incorrect behaviour when a partial read
from the socket forced the function to return and restart
later when more data was available. At this point the local
variables contained incorrect data.

Change-Id: I4db1f4ef5c46a3d2d7f7c5328e906188c3af49e6
BUG: 1334285
Signed-off-by: Xavier Hernandez &lt;xhernandez@datalab.es&gt;
Reviewed-on: http://review.gluster.org/14270
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd: add defence mechanism to avoid brick port clashes</title>
<updated>2016-05-04T09:25:31+00:00</updated>
<author>
<name>Prasanna Kumar Kalever</name>
<email>prasanna.kalever@redhat.com</email>
</author>
<published>2016-04-27T13:42:19+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=89759de7e47d99eb1fca2763931b4f33ac765173'/>
<id>89759de7e47d99eb1fca2763931b4f33ac765173</id>
<content type='text'>
Intro:
Currently glusterd maintain the portmap registry which contains ports that
are free to use between 49152 - 65535, this registry is initialized
once, and updated accordingly as an then when glusterd sees they are been
used.

Glusterd first checks for a port within the portmap registry and gets a FREE
port marked in it, then checks if that port is currently free using a connect()
function then passes it to brick process which have to bind on it.

Problem:
We see that there is a time gap between glusterd checking the port with
connect() and brick process actually binding on it. In this time gap it could
be so possible that any process would have occupied this port because of which
brick will fail to bind and exit.

Case 1:
To avoid the gluster client process occupying the port supplied by glusterd :

we have separated the client port map range with brick port map range more @
http://review.gluster.org/#/c/13998/

Case 2: (Handled by this patch)
To avoid the other foreign process occupying the port supplied by glusterd :

To handle above situation this patch implements a mechanism to return EADDRINUSE
error code to glusterd, upon which a new port is allocated and try to restart
the brick process with the newly allocated port.

Note: Incase of glusterd restarts i.e. runner_run_nowait() there is no way to
handle Case 2, becuase runner_run_nowait() will not wait to get the return/exit
code of the executed command (brick process). Hence as of now in such case,
we cannot know with what error the brick has failed to connect.

This patch also fix the runner_end() to perform some cleanup w.r.t
return values.

Change-Id: Iec52e7f5d87ce938d173f8ef16aa77fd573f2c5e
BUG: 1322805
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14043
Tested-by: Prasanna Kumar Kalever &lt;pkalever@redhat.com&gt;
Reviewed-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Intro:
Currently glusterd maintain the portmap registry which contains ports that
are free to use between 49152 - 65535, this registry is initialized
once, and updated accordingly as an then when glusterd sees they are been
used.

Glusterd first checks for a port within the portmap registry and gets a FREE
port marked in it, then checks if that port is currently free using a connect()
function then passes it to brick process which have to bind on it.

Problem:
We see that there is a time gap between glusterd checking the port with
connect() and brick process actually binding on it. In this time gap it could
be so possible that any process would have occupied this port because of which
brick will fail to bind and exit.

Case 1:
To avoid the gluster client process occupying the port supplied by glusterd :

we have separated the client port map range with brick port map range more @
http://review.gluster.org/#/c/13998/

Case 2: (Handled by this patch)
To avoid the other foreign process occupying the port supplied by glusterd :

To handle above situation this patch implements a mechanism to return EADDRINUSE
error code to glusterd, upon which a new port is allocated and try to restart
the brick process with the newly allocated port.

Note: Incase of glusterd restarts i.e. runner_run_nowait() there is no way to
handle Case 2, becuase runner_run_nowait() will not wait to get the return/exit
code of the executed command (brick process). Hence as of now in such case,
we cannot know with what error the brick has failed to connect.

This patch also fix the runner_end() to perform some cleanup w.r.t
return values.

Change-Id: Iec52e7f5d87ce938d173f8ef16aa77fd573f2c5e
BUG: 1322805
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14043
Tested-by: Prasanna Kumar Kalever &lt;pkalever@redhat.com&gt;
Reviewed-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc: define client port range</title>
<updated>2016-05-03T10:59:59+00:00</updated>
<author>
<name>Prasanna Kumar Kalever</name>
<email>prasanna.kalever@redhat.com</email>
</author>
<published>2016-04-14T13:32:19+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=50ca12326bde53895b7227b12ef4d74a69e2a0f9'/>
<id>50ca12326bde53895b7227b12ef4d74a69e2a0f9</id>
<content type='text'>
Problem:
when bind-insecure is 'off', all the clients bind to secure ports,
if incase all the secure ports exhaust the client will no more bind
to secure ports and tries gets a random port which is obviously insecure.

we have seen the client obtaining a port number in the range 49152-65535
which are actually reserved as part of glusterd's pmap_registry for bricks,
hence this will lead to port clashes between client and brick processes.

Solution:
If we can define different port ranges for clients incase where secure ports
exhaust, we can avoid the maximum port clashes with in gluster processes.

Still we are prone to have clashes with other non-gluster processes, but
the chances being very low in the rhgs Env, but that's a different story
on its own, which will be handled in upcoming patches.

Change-Id: Ib5ce05991aa1290ccb17f6f04ffd65caf411feaf
BUG: 1322805
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
Reviewed-on: http://review.gluster.org/13998
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
when bind-insecure is 'off', all the clients bind to secure ports,
if incase all the secure ports exhaust the client will no more bind
to secure ports and tries gets a random port which is obviously insecure.

we have seen the client obtaining a port number in the range 49152-65535
which are actually reserved as part of glusterd's pmap_registry for bricks,
hence this will lead to port clashes between client and brick processes.

Solution:
If we can define different port ranges for clients incase where secure ports
exhaust, we can avoid the maximum port clashes with in gluster processes.

Still we are prone to have clashes with other non-gluster processes, but
the chances being very low in the rhgs Env, but that's a different story
on its own, which will be handled in upcoming patches.

Change-Id: Ib5ce05991aa1290ccb17f6f04ffd65caf411feaf
BUG: 1322805
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
Reviewed-on: http://review.gluster.org/13998
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
