<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git, branch v7.4</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>doc: Added release 7.4 notes</title>
<updated>2020-03-18T12:38:39+00:00</updated>
<author>
<name>Rinku Kothiya</name>
<email>rkothiya@redhat.com</email>
</author>
<published>2020-03-18T12:29:52+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=87742bdeeb6ed4cd39533d19a6254f336a3fd52e'/>
<id>87742bdeeb6ed4cd39533d19a6254f336a3fd52e</id>
<content type='text'>
Fixes: #1124

Change-Id: I02fbb97ea7ab7617086ebcece07213e67cb1aa67
Signed-off-by: Rinku Kothiya &lt;rkothiya@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes: #1124

Change-Id: I02fbb97ea7ab7617086ebcece07213e67cb1aa67
Signed-off-by: Rinku Kothiya &lt;rkothiya@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/ec: Change handling of heal failure to avoid crash</title>
<updated>2020-03-17T14:27:36+00:00</updated>
<author>
<name>Ashish Pandey</name>
<email>aspandey@redhat.com</email>
</author>
<published>2019-07-11T11:22:49+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=5b9e4bbeb115d39e1a5e929b4ffbe981e4597ae7'/>
<id>5b9e4bbeb115d39e1a5e929b4ffbe981e4597ae7</id>
<content type='text'>
Problem:
ec_getxattr_heal_cbk was called with NULL as second argument
in case heal was failing.
This function was dereferencing "cookie" argument which caused crash.

Solution:
Cookie is changed to carry the value that was supposed to be
stored in fop-&gt;data, so even in the case when fop is NULL in error
case, there won't be any NULL dereference.

Thanks to Xavi for the suggestion about the fix.

Change-Id: I0798000d5cadb17c3c2fbfa1baf77033ffc2bb8c
updates: #1061
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
ec_getxattr_heal_cbk was called with NULL as second argument
in case heal was failing.
This function was dereferencing "cookie" argument which caused crash.

Solution:
Cookie is changed to carry the value that was supposed to be
stored in fop-&gt;data, so even in the case when fop is NULL in error
case, there won't be any NULL dereference.

Thanks to Xavi for the suggestion about the fix.

Change-Id: I0798000d5cadb17c3c2fbfa1baf77033ffc2bb8c
updates: #1061
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd: Brick process fails to come up with brickmux on</title>
<updated>2020-03-17T06:04:40+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://dev.gluster.org/cgit/glusterfs.git/commit/?id=4bb9b30b4d7f49d17e57fad2540d9398c83d427a'/>
<id>4bb9b30b4d7f49d17e57fad2540d9398c83d427a</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

&gt; Change-Id: Idfe0e8710f7eb77ca3ddfa1cabeb45b2987f41aa
&gt; Bug: bz#1773856
&gt; Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;
(cherry picked from commit 45e81aae791da9d013aba2286af44826227c05ec)

Change-Id: Idfe0e8710f7eb77ca3ddfa1cabeb45b2987f41aa
fixes: bz#1808964
Signed-off-by: Sanju Rakonde &lt;srakonde@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

&gt; Change-Id: Idfe0e8710f7eb77ca3ddfa1cabeb45b2987f41aa
&gt; Bug: bz#1773856
&gt; Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;
(cherry picked from commit 45e81aae791da9d013aba2286af44826227c05ec)

Change-Id: Idfe0e8710f7eb77ca3ddfa1cabeb45b2987f41aa
fixes: bz#1808964
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>events: fix IPv6 memory corruption</title>
<updated>2020-03-17T06:02:42+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@redhat.com</email>
</author>
<published>2020-01-14T12:28:47+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d17860ab2fb06984a0e7bf1740326c4b0f398c5c'/>
<id>d17860ab2fb06984a0e7bf1740326c4b0f398c5c</id>
<content type='text'>
When an event was generated and the target host was resolved to an IPv6
address, there was a memory overflow when that address was copied to a
fixed IPv4 structure (IPv6 addresses are longer than IPv4 ones).

This fix correctly handles IPv4 and IPv6 addresses returned by
getaddrinfo()

Backport of:
&gt; Change-Id: I5864a0c6e6f1b405bd85988529570140cf23b250
&gt; Fixes: bz#1790870
&gt; Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;

Change-Id: I5864a0c6e6f1b405bd85988529570140cf23b250
Fixes: #1030
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When an event was generated and the target host was resolved to an IPv6
address, there was a memory overflow when that address was copied to a
fixed IPv4 structure (IPv6 addresses are longer than IPv4 ones).

This fix correctly handles IPv4 and IPv6 addresses returned by
getaddrinfo()

Backport of:
&gt; Change-Id: I5864a0c6e6f1b405bd85988529570140cf23b250
&gt; Fixes: bz#1790870
&gt; Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;

Change-Id: I5864a0c6e6f1b405bd85988529570140cf23b250
Fixes: #1030
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd: stop stale bricks during handshaking in brick mux mode</title>
<updated>2020-03-16T08:25:40+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://dev.gluster.org/cgit/glusterfs.git/commit/?id=933b46b4a3538794b3a29c8f7b6472b58998be6a'/>
<id>933b46b4a3538794b3a29c8f7b6472b58998be6a</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.

patch on master: https://review.gluster.org/#/c/glusterfs/+/23042/

&gt; Bug: bz#1733425
&gt; Change-Id: I6bac6b871f7e31cb5bf277db979289dec196a03e
&gt; Signed-off-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
&gt; Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;

fixes: bz#1812849
Change-Id: I6bac6b871f7e31cb5bf277db979289dec196a03e
Signed-off-by: Sanju Rakonde &lt;srakonde@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.

patch on master: https://review.gluster.org/#/c/glusterfs/+/23042/

&gt; Bug: bz#1733425
&gt; Change-Id: I6bac6b871f7e31cb5bf277db979289dec196a03e
&gt; Signed-off-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
&gt; Signed-off-by: Mohammed Rafi KC &lt;rkavunga@redhat.com&gt;

fixes: bz#1812849
Change-Id: I6bac6b871f7e31cb5bf277db979289dec196a03e
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>multiple: fix bad type cast</title>
<updated>2020-03-16T08:21:00+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@redhat.com</email>
</author>
<published>2019-12-20T13:14:32+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=dfaaace24d26d8e39f7783e99ac7440eafeced74'/>
<id>dfaaace24d26d8e39f7783e99ac7440eafeced74</id>
<content type='text'>
When using inode_ctx_get() or inode_ctx_set(), a 'uint64_t *' is expected.
In many cases, the value to retrieve or store is a pointer, which will be
of smaller size in some architectures (for example 32-bits). In this case,
directly passing the address of the pointer casted to an 'uint64_t *' is
wrong and can cause memory corruption.

Backport of:
&gt; Change-Id: Iae616da9dda528df6743fa2f65ae5cff5ad23258
&gt; Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
&gt; Fixes: bz#1785611

Change-Id: Iae616da9dda528df6743fa2f65ae5cff5ad23258
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
Fixes: bz#1785323
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using inode_ctx_get() or inode_ctx_set(), a 'uint64_t *' is expected.
In many cases, the value to retrieve or store is a pointer, which will be
of smaller size in some architectures (for example 32-bits). In this case,
directly passing the address of the pointer casted to an 'uint64_t *' is
wrong and can cause memory corruption.

Backport of:
&gt; Change-Id: Iae616da9dda528df6743fa2f65ae5cff5ad23258
&gt; Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
&gt; Fixes: bz#1785611

Change-Id: Iae616da9dda528df6743fa2f65ae5cff5ad23258
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
Fixes: bz#1785323
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/afr: fix race when bricks come up</title>
<updated>2020-03-16T08:18:51+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@redhat.com</email>
</author>
<published>2020-03-01T18:49:04+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=87f1163e83339b2c2923106e0d9a45e8a327bb7a'/>
<id>87f1163e83339b2c2923106e0d9a45e8a327bb7a</id>
<content type='text'>
The was a problem when self-heal was sending lookups at the same time
that one of the bricks was coming up. In this case there was a chance
that the number of 'up' bricks changes in the middle of sending the
requests to subvolumes which caused a discrepancy in the expected
number of replies and the actual number of sent requests.

This discrepancy caused that AFR continued executing requests before
all requests were complete. Eventually, the frame of the pending
request was destroyed when the operation terminated, causing a use-
after-free issue when the answer was finally received.

In theory the same thing could happen in the reverse way, i.e. AFR
tries to wait for more replies than sent requests, causing a hang.

Backport of:
&gt; Change-Id: I7ed6108554ca379d532efb1a29b2de8085410b70
&gt; Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
&gt; Fixes: bz#1808875

Change-Id: I7ed6108554ca379d532efb1a29b2de8085410b70
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
Fixes: bz#1809438
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The was a problem when self-heal was sending lookups at the same time
that one of the bricks was coming up. In this case there was a chance
that the number of 'up' bricks changes in the middle of sending the
requests to subvolumes which caused a discrepancy in the expected
number of replies and the actual number of sent requests.

This discrepancy caused that AFR continued executing requests before
all requests were complete. Eventually, the frame of the pending
request was destroyed when the operation terminated, causing a use-
after-free issue when the answer was finally received.

In theory the same thing could happen in the reverse way, i.e. AFR
tries to wait for more replies than sent requests, causing a hang.

Backport of:
&gt; Change-Id: I7ed6108554ca379d532efb1a29b2de8085410b70
&gt; Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
&gt; Fixes: bz#1808875

Change-Id: I7ed6108554ca379d532efb1a29b2de8085410b70
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
Fixes: bz#1809438
</pre>
</div>
</content>
</entry>
<entry>
<title>eventsapi: Set IPv4/IPv6 family based on input IP</title>
<updated>2020-03-16T08:11:11+00:00</updated>
<author>
<name>Aravinda VK</name>
<email>avishwan@redhat.com</email>
</author>
<published>2019-09-16T04:34:26+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=f3b85b01e4b61a52598a6789c61997c5dad65bf0'/>
<id>f3b85b01e4b61a52598a6789c61997c5dad65bf0</id>
<content type='text'>
server.sin_family was set to AF_INET while creating socket connection,
this was failing if the input address is IPv6(`::1`).

With this patch, sin_family is set by reading the ai_family of
`getaddrinfo` result.

Backport of:
&gt; Fixes: bz#1752330
&gt; Change-Id: I499f957b432842fa989c698f6e5b25b7016084eb
&gt; Signed-off-by: Aravinda VK &lt;avishwan@redhat.com&gt;

Fixes: bz#1807785
Change-Id: I499f957b432842fa989c698f6e5b25b7016084eb
Signed-off-by: Aravinda VK &lt;avishwan@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
server.sin_family was set to AF_INET while creating socket connection,
this was failing if the input address is IPv6(`::1`).

With this patch, sin_family is set by reading the ai_family of
`getaddrinfo` result.

Backport of:
&gt; Fixes: bz#1752330
&gt; Change-Id: I499f957b432842fa989c698f6e5b25b7016084eb
&gt; Signed-off-by: Aravinda VK &lt;avishwan@redhat.com&gt;

Fixes: bz#1807785
Change-Id: I499f957b432842fa989c698f6e5b25b7016084eb
Signed-off-by: Aravinda VK &lt;avishwan@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/ec: skip updating ctx-&gt;loc again when ec_fix_open/opendir</title>
<updated>2020-03-16T08:01:00+00:00</updated>
<author>
<name>Kinglong Mee</name>
<email>kinglongmee@gmail.com</email>
</author>
<published>2019-07-11T10:57:13+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=36e26424f5eabe1332a49c4ffaa3214d38675e29'/>
<id>36e26424f5eabe1332a49c4ffaa3214d38675e29</id>
<content type='text'>
The ec_manager_open/opendir memsets ctx-&gt;loc which causes
memory/inode leak, and ec_fheal uses ctx-&gt;loc out of fd-&gt;lock
that loc_copy may copy bad data when memset it.

This patch skips updating ctx-&gt;loc when it is initilizaed.
With it, ctx-&gt;loc is filled once, and never updated.

Change-Id: I3bf5ffce4caf4c1c667f7acaa14b451d37a3550a
fixes: bz#1806843
Signed-off-by: Kinglong Mee &lt;mijinlong@horiscale.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ec_manager_open/opendir memsets ctx-&gt;loc which causes
memory/inode leak, and ec_fheal uses ctx-&gt;loc out of fd-&gt;lock
that loc_copy may copy bad data when memset it.

This patch skips updating ctx-&gt;loc when it is initilizaed.
With it, ctx-&gt;loc is filled once, and never updated.

Change-Id: I3bf5ffce4caf4c1c667f7acaa14b451d37a3550a
fixes: bz#1806843
Signed-off-by: Kinglong Mee &lt;mijinlong@horiscale.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>afr: prevent spurious entry heals leading to gfid split-brain</title>
<updated>2020-02-25T17:07:04+00:00</updated>
<author>
<name>Ravishankar N</name>
<email>ravishankar@redhat.com</email>
</author>
<published>2020-02-11T09:04:48+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=2c5b724c0071ae184dd4bfd441d7346106387ed5'/>
<id>2c5b724c0071ae184dd4bfd441d7346106387ed5</id>
<content type='text'>
Problem:
In a hyperconverged setup with granular-entry-heal enabled, if a file is
recreated while one of the bricks is down, and an index heal is triggered
(with the brick still down), entry-self heal was doing a spurious heal
with just the 2 good bricks. It was doing a post-op leading to removal
of the filename from .glusterfs/indices/entry-changes as well as
erroneous setting of afr xattrs on the parent. When the brick came up,
the xattrs were cleared, resulting in the renamed file not getting
healed and leading to gfid split-brain and EIO on the mount.

Fix:
Proceed with entry heal only when shd can connect to all bricks of the replica,
just like in data and metadata heal.

fixes: bz#1804591
Change-Id: I916ae26ad1fabf259bc6362da52d433b7223b17e
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
(cherry picked from commit 06453d77d056fbaa393a137ca277a20e38d2f67e)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
In a hyperconverged setup with granular-entry-heal enabled, if a file is
recreated while one of the bricks is down, and an index heal is triggered
(with the brick still down), entry-self heal was doing a spurious heal
with just the 2 good bricks. It was doing a post-op leading to removal
of the filename from .glusterfs/indices/entry-changes as well as
erroneous setting of afr xattrs on the parent. When the brick came up,
the xattrs were cleared, resulting in the renamed file not getting
healed and leading to gfid split-brain and EIO on the mount.

Fix:
Proceed with entry heal only when shd can connect to all bricks of the replica,
just like in data and metadata heal.

fixes: bz#1804591
Change-Id: I916ae26ad1fabf259bc6362da52d433b7223b17e
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
(cherry picked from commit 06453d77d056fbaa393a137ca277a20e38d2f67e)
</pre>
</div>
</content>
</entry>
</feed>
