<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/mgmt/glusterd/src/glusterd-utils.c, branch v8.0alpha</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>glusterd: Brick process fails to come up with brickmux on</title>
<updated>2020-02-20T06:39:55+00:00</updated>
<author>
<name>Vishal Pandey</name>
<email>vpandey@redhat.com</email>
</author>
<published>2019-11-19T06:09:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=45e81aae791da9d013aba2286af44826227c05ec'/>
<id>45e81aae791da9d013aba2286af44826227c05ec</id>
<content type='text'>
Issue:
1- In a cluster of 3 Nodes N1, N2, N3. Create 3 volumes vol1,
vol2, vol3 with 3 bricks (one from each node)
2- Set cluster.brick-multiplex on
3- Start all 3 volumes
4- Check if all bricks on a node are running on same port
5- Kill N1
6- Set performance.readdir-ahead for volumes vol1, vol2, vol3
7- Bring N1 up and check volume status
8- All bricks processes not running on N1.

Root Cause -
Since, There is a diff in volfile versions in N1 as compared
to N2 and N3 therefore glusterd_import_friend_volume() is called.
glusterd_import_friend_volume() copies the new_volinfo and deletes
old_volinfo and then calls glusterd_start_bricks().
glusterd_start_bricks() looks for the volfiles and sends an rpc
request to glusterfs_handle_attach(). Now, since the volinfo
has been deleted by glusterd_delete_stale_volume()
from priv-&gt;volumes list before glusterd_start_bricks() and
glusterd_create_volfiles_and_notify_services() and
glusterd_list_add_order is called after glusterd_start_bricks(),
therefore the attach RPC req gets an empty volfile path
and that causes the brick to crash.

Fix- Call glusterd_list_add_order() and
glusterd_create_volfiles_and_notify_services before
glusterd_start_bricks() cal is made in glusterd_import_friend_volume

Change-Id: Idfe0e8710f7eb77ca3ddfa1cabeb45b2987f41aa
Fixes: bz#1773856
Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue:
1- In a cluster of 3 Nodes N1, N2, N3. Create 3 volumes vol1,
vol2, vol3 with 3 bricks (one from each node)
2- Set cluster.brick-multiplex on
3- Start all 3 volumes
4- Check if all bricks on a node are running on same port
5- Kill N1
6- Set performance.readdir-ahead for volumes vol1, vol2, vol3
7- Bring N1 up and check volume status
8- All bricks processes not running on N1.

Root Cause -
Since, There is a diff in volfile versions in N1 as compared
to N2 and N3 therefore glusterd_import_friend_volume() is called.
glusterd_import_friend_volume() copies the new_volinfo and deletes
old_volinfo and then calls glusterd_start_bricks().
glusterd_start_bricks() looks for the volfiles and sends an rpc
request to glusterfs_handle_attach(). Now, since the volinfo
has been deleted by glusterd_delete_stale_volume()
from priv-&gt;volumes list before glusterd_start_bricks() and
glusterd_create_volfiles_and_notify_services() and
glusterd_list_add_order is called after glusterd_start_bricks(),
therefore the attach RPC req gets an empty volfile path
and that causes the brick to crash.

Fix- Call glusterd_list_add_order() and
glusterd_create_volfiles_and_notify_services before
glusterd_start_bricks() cal is made in glusterd_import_friend_volume

Change-Id: Idfe0e8710f7eb77ca3ddfa1cabeb45b2987f41aa
Fixes: bz#1773856
Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>multiple files: ensure nfs_svc functions are available</title>
<updated>2020-01-23T10:35:13+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2020-01-22T13:50:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=be673d9d093d977f4f38f2dba3f422c796db37b7'/>
<id>be673d9d093d977f4f38f2dba3f422c796db37b7</id>
<content type='text'>
When gNFS is disabled in build time, we have to ensure
taht the .stop(), .start() and other functions of the nfs_svc
are not called, otherwise we'd crash.
In addition, #ifdef more code that is gNFS related.

updates: bz#1793995
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: I5081f1670c04ca306aeaab7208829b0f2f149a42
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When gNFS is disabled in build time, we have to ensure
taht the .stop(), .start() and other functions of the nfs_svc
are not called, otherwise we'd crash.
In addition, #ifdef more code that is gNFS related.

updates: bz#1793995
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: I5081f1670c04ca306aeaab7208829b0f2f149a42
</pre>
</div>
</content>
</entry>
<entry>
<title>multiple xlators: reduce key length</title>
<updated>2020-01-14T17:11:22+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-12-09T19:28:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=9969d1dc2a3e815b161ce8a3dc5d08f84cfe011f'/>
<id>9969d1dc2a3e815b161ce8a3dc5d08f84cfe011f</id>
<content type='text'>
In many cases, we were freely allocating long keys with no need.
Smaller char arrays are just fine almost anywhere, so just went ahead
and looked where they we can use smaller ones.

In some cases, annotated the functions as static and the prefixes
passed as const as it was easier to read and understand.

Where relevant, converted the dict functions to use known key length.

Change-Id: I882ab33ea20d90b63278336cd1370c09ffdab7f2
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>
In many cases, we were freely allocating long keys with no need.
Smaller char arrays are just fine almost anywhere, so just went ahead
and looked where they we can use smaller ones.

In some cases, annotated the functions as static and the prefixes
passed as const as it was easier to read and understand.

Where relevant, converted the dict functions to use known key length.

Change-Id: I882ab33ea20d90b63278336cd1370c09ffdab7f2
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd: deafult options after volume reset</title>
<updated>2020-01-01T14:15:02+00:00</updated>
<author>
<name>Sanju Rakonde</name>
<email>srakonde@redhat.com</email>
</author>
<published>2019-12-25T16:26:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e40d0c399333e1ef62ff104b5cd35d8a5baa75f4'/>
<id>e40d0c399333e1ef62ff104b5cd35d8a5baa75f4</id>
<content type='text'>
Problem: default option itransport.address-family is disappered
in volume info output after a volume reset.

Cause: with 3.8.0 onwards volume option transport.address-family
has default value, any volume which is created will have this
option set. So, volume info will show this in its output. But,
with reset volume, this option is not handled.

Solution: In glusterd_enable_default_options(), we should add this
option along with other default options. This function is called
by glusterd_options_reset() with volume reset command.

fixes: bz#1786478

Change-Id: I58f7aa24cf01f308c4efe6cae748cc3bc8b99b1d
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: default option itransport.address-family is disappered
in volume info output after a volume reset.

Cause: with 3.8.0 onwards volume option transport.address-family
has default value, any volume which is created will have this
option set. So, volume info will show this in its output. But,
with reset volume, this option is not handled.

Solution: In glusterd_enable_default_options(), we should add this
option along with other default options. This function is called
by glusterd_options_reset() with volume reset command.

fixes: bz#1786478

Change-Id: I58f7aa24cf01f308c4efe6cae748cc3bc8b99b1d
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[RFC]#ifdef gNFS related code if we are not compiling gNFS</title>
<updated>2019-12-18T03:47:42+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-12-03T10:57:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=194e4216c8e30612f96f8f3712fdb3f1c96b3a08'/>
<id>194e4216c8e30612f96f8f3712fdb3f1c96b3a08</id>
<content type='text'>
If we are not compiling gNFS (--enable-gnfs is not given in the
./configure script params), there is little point in compiling code
that is related to it.

This patch tries to eliminate it.
My hope (and it's not clear from the code ) is that I did not break
the NFS Ganesha support as well.

Other than that, tried to compile with and without anad it looks sane.

Change-Id: I8d6c98066b9fceab4ec10fc6f5e81ab069e853bd
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>
If we are not compiling gNFS (--enable-gnfs is not given in the
./configure script params), there is little point in compiling code
that is related to it.

This patch tries to eliminate it.
My hope (and it's not clear from the code ) is that I did not break
the NFS Ganesha support as well.

Other than that, tried to compile with and without anad it looks sane.

Change-Id: I8d6c98066b9fceab4ec10fc6f5e81ab069e853bd
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd-op-sm.c (and others) - improve glusterd_op_stage_set_volume()</title>
<updated>2019-11-29T13:38:00+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-11-03T13:21:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=b35f8addc6b582a2498dfae546fbb942964c66b3'/>
<id>b35f8addc6b582a2498dfae546fbb942964c66b3</id>
<content type='text'>
Multiple changes to the function in the hope to make it somewhat faster.
1. Checking for key length against constant strings before calling
strcmp() to save some calls.
2. Verifying if a match was already made against the key to reduce
yet more checks.
3. Alignment of error message when they can fit on less lines - just
makes 'grep' on the code for error messages easier and it's more
readable.
4. Multiple functions where call _gd_get_vmep() one by one.
Instead, extracted it to be callable (it was static) and re-used
its result, instead of calling it again and again.
5. Removed some unneeded include statement.
6. Removed redundant null checks.

Hopefully, no functional changes.

Change-Id: Id281224e49adeca6757f96653b4cb13c7c9ba8c9
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>
Multiple changes to the function in the hope to make it somewhat faster.
1. Checking for key length against constant strings before calling
strcmp() to save some calls.
2. Verifying if a match was already made against the key to reduce
yet more checks.
3. Alignment of error message when they can fit on less lines - just
makes 'grep' on the code for error messages easier and it's more
readable.
4. Multiple functions where call _gd_get_vmep() one by one.
Instead, extracted it to be callable (it was static) and re-used
its result, instead of calling it again and again.
5. Removed some unneeded include statement.
6. Removed redundant null checks.

Hopefully, no functional changes.

Change-Id: Id281224e49adeca6757f96653b4cb13c7c9ba8c9
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd-utils.c: attach_brick() - remove dead code</title>
<updated>2019-10-11T03:55:28+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-10-03T12:20:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=79f69d9b4f3c4fdf77dc77989447b6f1d5d5c658'/>
<id>79f69d9b4f3c4fdf77dc77989447b6f1d5d5c658</id>
<content type='text'>
pidfile1 and pidfile2 were not used anywhere.
Removed the assignment and the variables.

Change-Id: Ic5fe091ba28bb500c370410a63440953048fd0b7
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>
pidfile1 and pidfile2 were not used anywhere.
Removed the assignment and the variables.

Change-Id: Ic5fe091ba28bb500c370410a63440953048fd0b7
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mgmt/glusterd: Fixed typos and reworded logs</title>
<updated>2019-09-23T02:47:32+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2019-09-20T06:00:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=d654dfa526457dc991ebef66fdecda8f0aac529b'/>
<id>d654dfa526457dc991ebef66fdecda8f0aac529b</id>
<content type='text'>
Fixed typos and reworded log messages for clarity.

Change-Id: I46f616ce7d3eb993c77a5812e8bc044e5f283354
Fixes: bz#1753859
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed typos and reworded log messages for clarity.

Change-Id: I46f616ce7d3eb993c77a5812e8bc044e5f283354
Fixes: bz#1753859
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd: stop stale bricks during handshaking in brick mux mode</title>
<updated>2019-08-25T08:18:54+00:00</updated>
<author>
<name>Atin Mukherjee</name>
<email>amukherj@redhat.com</email>
</author>
<published>2019-07-15T05:56:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=f0be15cd534b91f88c0239ae850f22c5f2b90c0f'/>
<id>f0be15cd534b91f88c0239ae850f22c5f2b90c0f</id>
<content type='text'>
This patch addresses two problems:

1. During friend handshaking, if a volume is imported due to change in
the version, the old bricks were not stopped which would lead to a
situation where bricks will run with old volfiles.

2. As part of attaching shd service in glusterd_attach_svc, there might
be a case that the volume for which we're attempting to attach a shd
service might become stale and in the process of deletion and hence in
every retrials (if the rpc connection isn't ready) check for the
existance of the volume and then only attempt the further attach
request.

Fixes: bz#1733425
Change-Id: I6bac6b871f7e31cb5bf277db979289dec196a03e
Signed-off-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch addresses two problems:

1. During friend handshaking, if a volume is imported due to change in
the version, the old bricks were not stopped which would lead to a
situation where bricks will run with old volfiles.

2. As part of attaching shd service in glusterd_attach_svc, there might
be a case that the volume for which we're attempting to attach a shd
service might become stale and in the process of deletion and hence in
every retrials (if the rpc connection isn't ready) check for the
existance of the volume and then only attempt the further attach
request.

Fixes: bz#1733425
Change-Id: I6bac6b871f7e31cb5bf277db979289dec196a03e
Signed-off-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>posix: In brick_mux brick is crashed while start/stop volume in loop</title>
<updated>2019-08-20T05:28:39+00:00</updated>
<author>
<name>Mohit Agrawal</name>
<email>moagrawal@redhat.com</email>
</author>
<published>2019-07-16T15:06:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=f138d3fa2237e7fa940ecf17153fd700350c4138'/>
<id>f138d3fa2237e7fa940ecf17153fd700350c4138</id>
<content type='text'>
Problem: In brick_mux environment sometime brick is crashed while
         volume stop/start in a loop.Brick is crashed in janitor task
         at the time of accessing priv.If posix priv is cleaned up before
         call janitor task then janitor task is crashed.

Solution: To avoid the crash in brick_mux environment introduce a new
          flag janitor_task_stop in posix_private and before send CHILD_DOWN event
          wait for update the flag by janitor_task_done

Change-Id: Id9fa5d183a463b2b682774ab5cb9868357d139a4
fixes: bz#1730409
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: In brick_mux environment sometime brick is crashed while
         volume stop/start in a loop.Brick is crashed in janitor task
         at the time of accessing priv.If posix priv is cleaned up before
         call janitor task then janitor task is crashed.

Solution: To avoid the crash in brick_mux environment introduce a new
          flag janitor_task_stop in posix_private and before send CHILD_DOWN event
          wait for update the flag by janitor_task_done

Change-Id: Id9fa5d183a463b2b682774ab5cb9868357d139a4
fixes: bz#1730409
Signed-off-by: Mohit Agrawal &lt;moagrawal@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
