<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/rpc, branch v8.1</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>posix: Implement a janitor thread to close fd</title>
<updated>2020-08-21T10:38:07+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawa@redhat.com</email>
</author>
<published>2020-07-27T12:38:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e173c5b0ee32c210a7d36f03f1847c42218a62e5'/>
<id>e173c5b0ee32c210a7d36f03f1847c42218a62e5</id>
<content type='text'>
Problem: In the commit fb20713b380e1df8d7f9e9df96563be2f9144fd6 we use
         syntask to close fd but we have found the patch is reducing the
         performance

Solution: Use janitor thread to close fd's and save the pfd ctx into
          ctx janitor list and also save the posix_xlator into pfd object to
          avoid the race condition during cleanup in brick_mux environment

Change-Id: Ifb3d18a854b267333a3a9e39845bfefb83fbc092
Fixes: #1396
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
(cherry picked from commit 41b9616435cbdf671805856e487e373060c9455b)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: In the commit fb20713b380e1df8d7f9e9df96563be2f9144fd6 we use
         syntask to close fd but we have found the patch is reducing the
         performance

Solution: Use janitor thread to close fd's and save the pfd ctx into
          ctx janitor list and also save the posix_xlator into pfd object to
          avoid the race condition during cleanup in brick_mux environment

Change-Id: Ifb3d18a854b267333a3a9e39845bfefb83fbc092
Fixes: #1396
Signed-off-by: Mohit Agrawal &lt;moagrawa@redhat.com&gt;
(cherry picked from commit 41b9616435cbdf671805856e487e373060c9455b)
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd: dump SSL error stack on disconnect</title>
<updated>2020-08-20T13:27:50+00:00</updated>
<author>
<name>Leonid Ishimnikov</name>
<email>lishim@fastmail.com</email>
</author>
<published>2020-08-13T19:37:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=05060c9664153beb392206ae05a498d4d4178f5f'/>
<id>05060c9664153beb392206ae05a498d4d4178f5f</id>
<content type='text'>
Problem:  When a non-SSL connection is attempted on an SSL-enabled
          management port, unrelated peers are subsequently disconnected
          from the node with a misleading error message.
Cause:    A non-SSL client causes OpenSSL to push a wrong version error
          into its thread-local error stack, but this error is never
          cleared, and it lingers in the stack until the thread is used
          by another SSL session, and a certain condition requires the error
          stack to be examined, at which time the old error is discovered and
          the connection is terminated.
Solution: Log and clear the error stack upon terminating the connection.

Change-Id: I82f3a723285df24dafc88850ae4fca65b69f6ae4
Fixes: #1418
Signed-off-by: Leonid Ishimnikov &lt;lishim@fastmail.com&gt;
(cherry picked from commit bb5801d1480314e09b4203d2525bd01aada5c683)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  When a non-SSL connection is attempted on an SSL-enabled
          management port, unrelated peers are subsequently disconnected
          from the node with a misleading error message.
Cause:    A non-SSL client causes OpenSSL to push a wrong version error
          into its thread-local error stack, but this error is never
          cleared, and it lingers in the stack until the thread is used
          by another SSL session, and a certain condition requires the error
          stack to be examined, at which time the old error is discovered and
          the connection is terminated.
Solution: Log and clear the error stack upon terminating the connection.

Change-Id: I82f3a723285df24dafc88850ae4fca65b69f6ae4
Fixes: #1418
Signed-off-by: Leonid Ishimnikov &lt;lishim@fastmail.com&gt;
(cherry picked from commit bb5801d1480314e09b4203d2525bd01aada5c683)
</pre>
</div>
</content>
</entry>
<entry>
<title>test: tests/bugs/rpc/bug-847624.t is crashed</title>
<updated>2020-04-15T08:00:49+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawal@redhat.com</email>
</author>
<published>2020-04-09T07:38:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=d0cb5cbaff22ec5fcb685a327d6d54e5ae8d87f2'/>
<id>d0cb5cbaff22ec5fcb685a327d6d54e5ae8d87f2</id>
<content type='text'>
Problem: glusterfs(GNFS) is crashing at the time of handling
         Pollerr event in rpcsvc_drc_client_unref.GNFS is crashed
         because ref was 0 at the time of unref and ref was taken
         while Pollin event successfully handled.

Solution: Convert drc_client ref to atomic ref to avoid the crash

Change-Id: Ia4c054f2f388032a5cd99597d0cfa18b003ca690
Fixes: #1038
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: glusterfs(GNFS) is crashing at the time of handling
         Pollerr event in rpcsvc_drc_client_unref.GNFS is crashed
         because ref was 0 at the time of unref and ref was taken
         while Pollin event successfully handled.

Solution: Convert drc_client ref to atomic ref to avoid the crash

Change-Id: Ia4c054f2f388032a5cd99597d0cfa18b003ca690
Fixes: #1038
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc: Make ssl log more useful</title>
<updated>2020-04-02T08:31:29+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawal@redhat.com</email>
</author>
<published>2020-03-31T11:15:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=80dd8cceab3b860bf1bc2945c8e2d8d0b3913e48'/>
<id>80dd8cceab3b860bf1bc2945c8e2d8d0b3913e48</id>
<content type='text'>
Currently, ssl_setup_connection_params throws 4 messages for every
rpc connection that irritates a user while reading the logs. The same
info we can print in a single log with peerinfo to make it more
useful.ssl_setup_connection_params try to load dh_param even user
has not configured it and if a dh_param file is not available it throws
a failure message.To avoid the message load dh_param only while the user
has configured it.

Change-Id: I9ddb57f86a3fa3e519180cb5d88828e59fe0e487
Fixes: #1141
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, ssl_setup_connection_params throws 4 messages for every
rpc connection that irritates a user while reading the logs. The same
info we can print in a single log with peerinfo to make it more
useful.ssl_setup_connection_params try to load dh_param even user
has not configured it and if a dh_param file is not available it throws
a failure message.To avoid the message load dh_param only while the user
has configured it.

Change-Id: I9ddb57f86a3fa3e519180cb5d88828e59fe0e487
Fixes: #1141
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Posix: Use simple approach to close fd</title>
<updated>2020-03-20T04:08:42+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawal@redhat.com</email>
</author>
<published>2020-03-12T15:42:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=fb20713b380e1df8d7f9e9df96563be2f9144fd6'/>
<id>fb20713b380e1df8d7f9e9df96563be2f9144fd6</id>
<content type='text'>
Problem: posix_release(dir) functions add the fd's into a ctx-&gt;janitor_fds
         and janitor thread closes the fd's.In brick_mux environment it is
         difficult to handle race condition in janitor threads because brick
         spawns a single janitor thread for all bricks.

Solution: Use synctask to execute posix_release(dir) functions instead of 
          using background a thread to close fds.

Credits: Pranith Karampuri &lt;pkarampu@redhat.com&gt;
Change-Id: Iffb031f0695a7da83d5a2f6bac8863dad225317e
Fixes: bz#1811631
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: posix_release(dir) functions add the fd's into a ctx-&gt;janitor_fds
         and janitor thread closes the fd's.In brick_mux environment it is
         difficult to handle race condition in janitor threads because brick
         spawns a single janitor thread for all bricks.

Solution: Use synctask to execute posix_release(dir) functions instead of 
          using background a thread to close fds.

Credits: Pranith Karampuri &lt;pkarampu@redhat.com&gt;
Change-Id: Iffb031f0695a7da83d5a2f6bac8863dad225317e
Fixes: bz#1811631
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>feature/changelog: Avoid thread creation if xlator is not enabled</title>
<updated>2020-02-09T12:42:56+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawal@redhat.com</email>
</author>
<published>2018-09-29T07:45:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=6de80bcd6366778ac34ce58ec496fa08cc02bd0b'/>
<id>6de80bcd6366778ac34ce58ec496fa08cc02bd0b</id>
<content type='text'>
Problem:
Changelog creates threads even if the changelog is not enabled

Background:
Changelog xlator broadly does two things
  1. Journalling - Cosumers are geo-rep and glusterfind
  2. Event Notification for registered events like (open, release etc) -
     Consumers are bitrot, geo-rep

The existing option "changelog.changelog" controls journalling and
there is no option to control event notification and is enabled by
default. So when bitrot/geo-rep is not enabled on the volume, threads
and resources(rpc and rbuf) related to event notifications consumes
resources and cpu cycle which is unnecessary.

Solution:
The solution is to have two different options as below.
 1. changelog-notification : Event notifications
 2. changelog : Journalling

This patch introduces the option "changelog-notification" which is
not exposed to user. When either bitrot or changelog (journalling)
is enabled, it internally enbales 'changelog-notification'. But
once the 'changelog-notification' is enabled, it will not be disabled
for the life time of the brick process even after bitrot and changelog
is disabled. As of now, rpc resource cleanup has lot of races and is
difficult to cleanup cleanly. If allowed, it leads to memory leaks
and crashes on enable/disable of bitrot or changelog (journal) in a
loop. Hence to be safer, the event notification is not disabled within
lifetime of process once enabled.

Change-Id: Ifd00286e0966049e8eb9f21567fe407cf11bb02a
Updates: #475
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Changelog creates threads even if the changelog is not enabled

Background:
Changelog xlator broadly does two things
  1. Journalling - Cosumers are geo-rep and glusterfind
  2. Event Notification for registered events like (open, release etc) -
     Consumers are bitrot, geo-rep

The existing option "changelog.changelog" controls journalling and
there is no option to control event notification and is enabled by
default. So when bitrot/geo-rep is not enabled on the volume, threads
and resources(rpc and rbuf) related to event notifications consumes
resources and cpu cycle which is unnecessary.

Solution:
The solution is to have two different options as below.
 1. changelog-notification : Event notifications
 2. changelog : Journalling

This patch introduces the option "changelog-notification" which is
not exposed to user. When either bitrot or changelog (journalling)
is enabled, it internally enbales 'changelog-notification'. But
once the 'changelog-notification' is enabled, it will not be disabled
for the life time of the brick process even after bitrot and changelog
is disabled. As of now, rpc resource cleanup has lot of races and is
difficult to cleanup cleanly. If allowed, it leads to memory leaks
and crashes on enable/disable of bitrot or changelog (journal) in a
loop. Hence to be safer, the event notification is not disabled within
lifetime of process once enabled.

Change-Id: Ifd00286e0966049e8eb9f21567fe407cf11bb02a
Updates: #475
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bitrot: Make number of signer threads configurable</title>
<updated>2020-02-07T06:30:19+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2020-02-03T12:40:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=8fad76650bd85463708f59d2518f5b764ae4c702'/>
<id>8fad76650bd85463708f59d2518f5b764ae4c702</id>
<content type='text'>
The number of signing process threads (glfs_brpobj)
is set to 4 by default. The recommendation is to set
it to number of cores available. This patch makes it
configurable as follows

gluster vol bitrot &lt;volname&gt; signer-threads &lt;count&gt;

fixes: bz#1797869
Change-Id: Ia883b3e5e34e0bc8d095243508d320c9c9c58adc
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The number of signing process threads (glfs_brpobj)
is set to 4 by default. The recommendation is to set
it to number of cores available. This patch makes it
configurable as follows

gluster vol bitrot &lt;volname&gt; signer-threads &lt;count&gt;

fixes: bz#1797869
Change-Id: Ia883b3e5e34e0bc8d095243508d320c9c9c58adc
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>name.c: fix Coverity issues 1412332/3 - strcat into uninitialized value</title>
<updated>2020-01-19T16:37:00+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2020-01-14T14:55:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=c7b546326092d060bf84b7c578a4f21bc679674a'/>
<id>c7b546326092d060bf84b7c578a4f21bc679674a</id>
<content type='text'>
Check limit to 108 bytes before strcpy().

fixes: CID#1412332
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: I8b26b1e1d2daca98ff36db531539bec0a405769c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check limit to 108 bytes before strcpy().

fixes: CID#1412332
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: I8b26b1e1d2daca98ff36db531539bec0a405769c
</pre>
</div>
</content>
</entry>
<entry>
<title>socket.c/name.c: minor changes</title>
<updated>2020-01-13T07:29:25+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-12-31T07:11:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=905db496aa622e421d807222dcc488488da9dbfe'/>
<id>905db496aa622e421d807222dcc488488da9dbfe</id>
<content type='text'>
- Move functions to static
- Remove redundant checks
- Use dict_get_...sizen() where applicable
- Remove unused variables.
- Moved some code to be executed only if relevant.

~3% object size reduction.

Change-Id: Id9b8414e0a17442f1dac10ba77014d565756c935
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Move functions to static
- Remove redundant checks
- Use dict_get_...sizen() where applicable
- Remove unused variables.
- Moved some code to be executed only if relevant.

~3% object size reduction.

Change-Id: Id9b8414e0a17442f1dac10ba77014d565756c935
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc-transport: minor changes</title>
<updated>2020-01-13T07:28:53+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-12-31T13:11:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=c73adc852a6f94844bab9cf541838934dd8d45d4'/>
<id>c73adc852a6f94844bab9cf541838934dd8d45d4</id>
<content type='text'>
- Removed dead code
- Remove redundant checks
- Changed dict functions to use dict_..._sizen() functions.

Change-Id: If00aaa90eef4078effd5b7fed2294f872e001b0a
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Removed dead code
- Remove redundant checks
- Changed dict functions to use dict_..._sizen() functions.

Change-Id: If00aaa90eef4078effd5b7fed2294f872e001b0a
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
