<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/tests/bugs, branch v3.5.2beta1</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>nfs: prevent assertion error with MOUNT over UDP</title>
<updated>2014-07-10T07:15:18+00:00</updated>
<author>
<name>Niels de Vos</name>
<email>ndevos@redhat.com</email>
</author>
<published>2014-07-08T06:59:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=a4369c456de4304ebdb252bc2783d634a56f8301'/>
<id>a4369c456de4304ebdb252bc2783d634a56f8301</id>
<content type='text'>
The MOUNT service over UDP runs in a separate thread. This thread does
not have the correct *THIS xlator set. *THIS points to the global (base)
xlator structure, but GF_CALLOC() requires it to be the NFS-xlator so
that assertions can get validated correctly.

This is solved by passing the NFS-xlator to the pthread function, and
setting the *THIS pointer explicitly in the new thread.

It seems that on occasion (needs further investigation) MOUNT over UDP
does not unregister itself. There can also be issues when the kernel NLM
implementation has been registered at portmap/rpcbind, so adding some
unregister procedures in the cleanup of the test-cases.

Cherry picked from commit ec74ceedaa41047b88d270c00eeb071b73e19664:
&gt; Change-Id: I3be5a420fc800bbcc14198d0b6faf4cf2c7300b1
&gt; BUG: 1116503
&gt; Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/8241
&gt; Reviewed-by: Santosh Pradhan &lt;spradhan@redhat.com&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;

Change-Id: I3be5a420fc800bbcc14198d0b6faf4cf2c7300b1
BUG: 1116997
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8258
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-by: Santosh Pradhan &lt;spradhan@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The MOUNT service over UDP runs in a separate thread. This thread does
not have the correct *THIS xlator set. *THIS points to the global (base)
xlator structure, but GF_CALLOC() requires it to be the NFS-xlator so
that assertions can get validated correctly.

This is solved by passing the NFS-xlator to the pthread function, and
setting the *THIS pointer explicitly in the new thread.

It seems that on occasion (needs further investigation) MOUNT over UDP
does not unregister itself. There can also be issues when the kernel NLM
implementation has been registered at portmap/rpcbind, so adding some
unregister procedures in the cleanup of the test-cases.

Cherry picked from commit ec74ceedaa41047b88d270c00eeb071b73e19664:
&gt; Change-Id: I3be5a420fc800bbcc14198d0b6faf4cf2c7300b1
&gt; BUG: 1116503
&gt; Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/8241
&gt; Reviewed-by: Santosh Pradhan &lt;spradhan@redhat.com&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;

Change-Id: I3be5a420fc800bbcc14198d0b6faf4cf2c7300b1
BUG: 1116997
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8258
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-by: Santosh Pradhan &lt;spradhan@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gNFS: Support wildcard in RPC auth allow/reject</title>
<updated>2014-07-02T11:28:21+00:00</updated>
<author>
<name>Niels de Vos</name>
<email>ndevos@redhat.com</email>
</author>
<published>2014-07-02T09:11:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=f25c549c959e06e70eefc5744dc5f93668411de2'/>
<id>f25c549c959e06e70eefc5744dc5f93668411de2</id>
<content type='text'>
RFE: Support wildcard in "nfs.rpc-auth-allow" and
"nfs.rpc-auth-reject". e.g.
  *.redhat.com
  192.168.1[1-5].*
  192.168.1[1-5].*, *.redhat.com, 192.168.21.9

  Along with wildcard, support for subnetwork or IP range e.g.
  192.168.10.23/24

The option will be validated for following categories:
1) Anonymous i.e. "*"
2) Wildcard pattern i.e. string containing any ('*', '?', '[')
3) IPv4 address
4) IPv6 address
5) FQDN
6) subnetwork or IPv4 range

Currently this does not support IPv6 subnetwork.

Cherry-picked from 00e247ee44067f2b3e7ca5f7e6dc2f7934c97181:
&gt; Change-Id: Iac8caf5e490c8174d61111dad47fd547d4f67bf4
&gt; BUG: 1086097
&gt; Signed-off-by: Santosh Kumar Pradhan &lt;spradhan@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/7485
&gt; Reviewed-by: Poornima G &lt;pgurusid@redhat.com&gt;
&gt; Reviewed-by: Harshavardhana &lt;harsha@harshavardhana.net&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;

Change-Id: I18ef0a914cd403c1f9e66d1b03ecd29465cbce95
BUG: 1115369
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8223
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Santosh Pradhan &lt;spradhan@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RFE: Support wildcard in "nfs.rpc-auth-allow" and
"nfs.rpc-auth-reject". e.g.
  *.redhat.com
  192.168.1[1-5].*
  192.168.1[1-5].*, *.redhat.com, 192.168.21.9

  Along with wildcard, support for subnetwork or IP range e.g.
  192.168.10.23/24

The option will be validated for following categories:
1) Anonymous i.e. "*"
2) Wildcard pattern i.e. string containing any ('*', '?', '[')
3) IPv4 address
4) IPv6 address
5) FQDN
6) subnetwork or IPv4 range

Currently this does not support IPv6 subnetwork.

Cherry-picked from 00e247ee44067f2b3e7ca5f7e6dc2f7934c97181:
&gt; Change-Id: Iac8caf5e490c8174d61111dad47fd547d4f67bf4
&gt; BUG: 1086097
&gt; Signed-off-by: Santosh Kumar Pradhan &lt;spradhan@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/7485
&gt; Reviewed-by: Poornima G &lt;pgurusid@redhat.com&gt;
&gt; Reviewed-by: Harshavardhana &lt;harsha@harshavardhana.net&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;

Change-Id: I18ef0a914cd403c1f9e66d1b03ecd29465cbce95
BUG: 1115369
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8223
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Santosh Pradhan &lt;spradhan@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/index : Creation of indices directory as soon as brick is up.</title>
<updated>2014-06-27T08:48:49+00:00</updated>
<author>
<name>Anuradha</name>
<email>atalur@redhat.com</email>
</author>
<published>2014-06-23T09:07:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=cf5a5ab1a81bb61bb66982757ccd301d015ac16e'/>
<id>cf5a5ab1a81bb61bb66982757ccd301d015ac16e</id>
<content type='text'>
Missing indices directory in the bricks leads to unwanted log messages.
Therefore, indices directory needs to be created as soon as the brick
comes up.
This patch results in creation of indices/xattrop directory as required.
Also includes a testcase to test the same.

Backport of http://review.gluster.org/#/c/6343/
and http://review.gluster.org/#/c/6426/

Change-Id: I2a6f48b78aa09357ed60e45b62ec5fb08f816d76
BUG: 1112111
Signed-off-by: Anuradha &lt;atalur@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8152
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Missing indices directory in the bricks leads to unwanted log messages.
Therefore, indices directory needs to be created as soon as the brick
comes up.
This patch results in creation of indices/xattrop directory as required.
Also includes a testcase to test the same.

Backport of http://review.gluster.org/#/c/6343/
and http://review.gluster.org/#/c/6426/

Change-Id: I2a6f48b78aa09357ed60e45b62ec5fb08f816d76
BUG: 1112111
Signed-off-by: Anuradha &lt;atalur@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8152
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/stripe: Fix EINVAL errors on quota enabled volumes</title>
<updated>2014-06-27T08:46:29+00:00</updated>
<author>
<name>Krutika Dhananjay</name>
<email>kdhananj@redhat.com</email>
</author>
<published>2014-06-22T09:50:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=bf7c6105f643683e76e5659f028e6a08dabb019c'/>
<id>bf7c6105f643683e76e5659f028e6a08dabb019c</id>
<content type='text'>
        Backport of http://review.gluster.org/8145

Write operations on directories with quota enabled used to fail with
EINVAL on stripe volumes. This was due to assert failure in
stripe_lookup(), meant to ensure loc-&gt;path is not NULL. However,
in nameless lookup (in this particular case triggered by quotad, which
has stripe xlator in its graph), loc-&gt;path can be legitimately NULL.

The fix involves removing this check in stripe_lookup().

Change-Id: Ibbd4f68763fdd8a85f29da78b3937cef1ee4fd1e
BUG: 1100050
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8186
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
        Backport of http://review.gluster.org/8145

Write operations on directories with quota enabled used to fail with
EINVAL on stripe volumes. This was due to assert failure in
stripe_lookup(), meant to ensure loc-&gt;path is not NULL. However,
in nameless lookup (in this particular case triggered by quotad, which
has stripe xlator in its graph), loc-&gt;path can be legitimately NULL.

The fix involves removing this check in stripe_lookup().

Change-Id: Ibbd4f68763fdd8a85f29da78b3937cef1ee4fd1e
BUG: 1100050
Signed-off-by: Krutika Dhananjay &lt;kdhananj@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8186
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/stripe: don't treat ESTALE as failure in lookup</title>
<updated>2014-06-24T16:57:54+00:00</updated>
<author>
<name>Ravishankar N</name>
<email>root@ravi3.(none)</email>
</author>
<published>2014-06-19T17:41:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=f5b203fbaba2c4179c126f5db82cc89569ae1697'/>
<id>f5b203fbaba2c4179c126f5db82cc89569ae1697</id>
<content type='text'>
Backport of: http://review.gluster.org/8135

Problem:
In a stripe volume, symlinks are created only on the first brick via the
default_symlink() call. During gfid lookup, server sends ESTALE from the other
bricks, which is treated as error in stripe_lookup_cbk()

Fix:
Don't treat ESTALE as error in stripe_lookup_cbk()

BUG: 1111454
Change-Id: I337ef847f007b7c20feb365da329c79c121d20c4
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8153
Reviewed-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backport of: http://review.gluster.org/8135

Problem:
In a stripe volume, symlinks are created only on the first brick via the
default_symlink() call. During gfid lookup, server sends ESTALE from the other
bricks, which is treated as error in stripe_lookup_cbk()

Fix:
Don't treat ESTALE as error in stripe_lookup_cbk()

BUG: 1111454
Change-Id: I337ef847f007b7c20feb365da329c79c121d20c4
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
Reviewed-on: http://review.gluster.org/8153
Reviewed-by: Raghavendra Bhat &lt;raghavendra@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/index: Don't delete current xattrop index.</title>
<updated>2014-06-24T09:27:55+00:00</updated>
<author>
<name>Ravishankar N</name>
<email>ravishankar@redhat.com</email>
</author>
<published>2014-05-27T07:30:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=b14ec5104f60c0f3baa744835c1214fec6099e7b'/>
<id>b14ec5104f60c0f3baa744835c1214fec6099e7b</id>
<content type='text'>
Problem:
`gluster v heal &lt;volname&gt; statistics heal-count` was not able to read the
number of entries to be healed from the source brick because the base xattrop
entries in indices/base_indices_holder and indices/xattrop were getting deleted
after a successful heal and the code flow prevented them from creating it again.

Fix:
Don't delete the xattrop index unless it is stale (i.e. brick is restarted)

Change-Id: Ief4eee0ddf42c4d8b711d00751be92bbbc7bbbb0
BUG: 1101647
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
Reviewed-on: http://review.gluster.org/7897
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
`gluster v heal &lt;volname&gt; statistics heal-count` was not able to read the
number of entries to be healed from the source brick because the base xattrop
entries in indices/base_indices_holder and indices/xattrop were getting deleted
after a successful heal and the code flow prevented them from creating it again.

Fix:
Don't delete the xattrop index unless it is stale (i.e. brick is restarted)

Change-Id: Ief4eee0ddf42c4d8b711d00751be92bbbc7bbbb0
BUG: 1101647
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
Reviewed-on: http://review.gluster.org/7897
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc: implement server.manage-gids for group resolving on the bricks</title>
<updated>2014-05-23T08:34:02+00:00</updated>
<author>
<name>Niels de Vos</name>
<email>ndevos@redhat.com</email>
</author>
<published>2014-05-20T14:12:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=6b624e5502193b9d57116fb341119c8468f9758f'/>
<id>6b624e5502193b9d57116fb341119c8468f9758f</id>
<content type='text'>
The new volume option 'server.manage-gids' can be enabled in
environments where a user belongs to more than the current absolute
maximum of 93 groups. This option triggers the following behavior:

1. The AUTH_GLUSTERFS structure sent by GlusterFS clients (fuse, nfs or
   libgfapi) will contain only one (1) auxiliary group, instead of
   a full list. This reduces network usage and prevents problems in
   encoding the AUTH_GLUSTERFS structure which should fit in 400 bytes.
2. The single group in the RPC Calls received by the server is replaced
   by resolving the groups server-side. Permission checks and similar in
   lower xlators are applied against the full list of groups where the
   user belongs to, and not the single auxiliary group that the client
   sent.

Cherry picked from commit 2fd499d148fc8865c77de8b2c73fe0b7e1737882:
&gt; BUG: 1053579
&gt; Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/7501
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Santosh Pradhan &lt;spradhan@redhat.com&gt;
&gt; Reviewed-by: Harshavardhana &lt;harsha@harshavardhana.net&gt;
&gt; Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;

Change-Id: I9e540de13e3022f8b63ff893ecba511129a47b91
BUG: 1096425
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/7830
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Santosh Pradhan &lt;spradhan@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new volume option 'server.manage-gids' can be enabled in
environments where a user belongs to more than the current absolute
maximum of 93 groups. This option triggers the following behavior:

1. The AUTH_GLUSTERFS structure sent by GlusterFS clients (fuse, nfs or
   libgfapi) will contain only one (1) auxiliary group, instead of
   a full list. This reduces network usage and prevents problems in
   encoding the AUTH_GLUSTERFS structure which should fit in 400 bytes.
2. The single group in the RPC Calls received by the server is replaced
   by resolving the groups server-side. Permission checks and similar in
   lower xlators are applied against the full list of groups where the
   user belongs to, and not the single auxiliary group that the client
   sent.

Cherry picked from commit 2fd499d148fc8865c77de8b2c73fe0b7e1737882:
&gt; BUG: 1053579
&gt; Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/7501
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Santosh Pradhan &lt;spradhan@redhat.com&gt;
&gt; Reviewed-by: Harshavardhana &lt;harsha@harshavardhana.net&gt;
&gt; Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;

Change-Id: I9e540de13e3022f8b63ff893ecba511129a47b91
BUG: 1096425
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/7830
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Santosh Pradhan &lt;spradhan@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc: warn and truncate grouplist if RPC/AUTH can not hold everything</title>
<updated>2014-05-22T13:02:21+00:00</updated>
<author>
<name>Niels de Vos</name>
<email>ndevos@redhat.com</email>
</author>
<published>2014-05-12T01:51:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=57ec16e7f6d08b9a1c07f8ece3db630b08557372'/>
<id>57ec16e7f6d08b9a1c07f8ece3db630b08557372</id>
<content type='text'>
The GlusterFS protocol currently uses AUTH_GLUSTERFS_V2 in the RPC/AUTH
header. This header contains the uid, gid and auxiliary groups of the
user/process that accesses the Gluster Volume.

The AUTH_GLUSTERFS_V2 structure allows up to 65535 auxiliary groups to
be passed on. Unfortunately, the RPC/AUTH header is limited to 400 bytes
by the RPC specification: http://tools.ietf.org/html/rfc5531#section-8.2

In order to not cause complete failures on the client-side when trying
to encode a AUTH_GLUSTERFS_V2 that would result in more than 400 bytes,
we can calculate the expected size of the other elements:

    1 | pid
    1 | uid
    1 | gid
    1 | groups_len
   XX | groups_val (GF_MAX_AUX_GROUPS=65535)
    1 | lk_owner_len
   YY | lk_owner_val (GF_MAX_LOCK_OWNER_LEN=1024)
  ----+-------------------------------------------
    5 | total xdr-units

  one XDR-unit is defined as BYTES_PER_XDR_UNIT = 4 bytes
  MAX_AUTH_BYTES = 400 is the maximum, this is 100 xdr-units.
  XX + YY can be 95 to fill the 100 xdr-units.

  Note that the on-wire protocol has tighter requirements than the
  internal structures. It is possible for xlators to use more groups and
  a bigger lk_owner than that can be sent by a GlusterFS-client.

This change prevents overflows when allocating the RPC/AUTH header. Two
new macros are introduced to calculate the number of groups that fit in
the RPC/AUTH header, when taking the size of the lk_owner in account. In
case the list of groups exceeds the maximum possible, only the first
groups are passed over the RPC/GlusterFS protocol to the bricks.
A warning is added to the logs, so that most system administrators will
get informed.

The reducing of the number of groups is not a new inventions. The
RPC/AUTH header (AUTH_SYS or AUTH_UNIX) that NFS uses has a limit of 16
groups. Most, if not all, NFS-clients will reduce any bigger number of
groups to 16. (nfs.server-aux-gids can be used to workaround the limit
of 16 groups, but the Gluster NFS-server will be limited to a maximum of
93 groups, or fewer in case the lk_owner structure contains more items.)

Cherry picked from commit 8235de189845986a535d676b1fd2c894b9c02e52:
&gt; BUG: 1053579
&gt; Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/7202
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Harshavardhana &lt;harsha@harshavardhana.net&gt;
&gt; Reviewed-by: Santosh Pradhan &lt;spradhan@redhat.com&gt;
&gt; Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;

Change-Id: I8410e59d0fd246d601b54b961d3ae9cb5a858c10
BUG: 1096425
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/7829
Reviewed-by: Lalatendu Mohanty &lt;lmohanty@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The GlusterFS protocol currently uses AUTH_GLUSTERFS_V2 in the RPC/AUTH
header. This header contains the uid, gid and auxiliary groups of the
user/process that accesses the Gluster Volume.

The AUTH_GLUSTERFS_V2 structure allows up to 65535 auxiliary groups to
be passed on. Unfortunately, the RPC/AUTH header is limited to 400 bytes
by the RPC specification: http://tools.ietf.org/html/rfc5531#section-8.2

In order to not cause complete failures on the client-side when trying
to encode a AUTH_GLUSTERFS_V2 that would result in more than 400 bytes,
we can calculate the expected size of the other elements:

    1 | pid
    1 | uid
    1 | gid
    1 | groups_len
   XX | groups_val (GF_MAX_AUX_GROUPS=65535)
    1 | lk_owner_len
   YY | lk_owner_val (GF_MAX_LOCK_OWNER_LEN=1024)
  ----+-------------------------------------------
    5 | total xdr-units

  one XDR-unit is defined as BYTES_PER_XDR_UNIT = 4 bytes
  MAX_AUTH_BYTES = 400 is the maximum, this is 100 xdr-units.
  XX + YY can be 95 to fill the 100 xdr-units.

  Note that the on-wire protocol has tighter requirements than the
  internal structures. It is possible for xlators to use more groups and
  a bigger lk_owner than that can be sent by a GlusterFS-client.

This change prevents overflows when allocating the RPC/AUTH header. Two
new macros are introduced to calculate the number of groups that fit in
the RPC/AUTH header, when taking the size of the lk_owner in account. In
case the list of groups exceeds the maximum possible, only the first
groups are passed over the RPC/GlusterFS protocol to the bricks.
A warning is added to the logs, so that most system administrators will
get informed.

The reducing of the number of groups is not a new inventions. The
RPC/AUTH header (AUTH_SYS or AUTH_UNIX) that NFS uses has a limit of 16
groups. Most, if not all, NFS-clients will reduce any bigger number of
groups to 16. (nfs.server-aux-gids can be used to workaround the limit
of 16 groups, but the Gluster NFS-server will be limited to a maximum of
93 groups, or fewer in case the lk_owner structure contains more items.)

Cherry picked from commit 8235de189845986a535d676b1fd2c894b9c02e52:
&gt; BUG: 1053579
&gt; Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/7202
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Harshavardhana &lt;harsha@harshavardhana.net&gt;
&gt; Reviewed-by: Santosh Pradhan &lt;spradhan@redhat.com&gt;
&gt; Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;

Change-Id: I8410e59d0fd246d601b54b961d3ae9cb5a858c10
BUG: 1096425
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/7829
Reviewed-by: Lalatendu Mohanty &lt;lmohanty@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>posix: if brick-uid or brick-gid is not specified, do not set</title>
<updated>2014-05-09T14:36:02+00:00</updated>
<author>
<name>Niels de Vos</name>
<email>ndevos@redhat.com</email>
</author>
<published>2014-05-09T01:21:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e528724e793a8add1e3c21932913d8cb4e93da8c'/>
<id>e528724e793a8add1e3c21932913d8cb4e93da8c</id>
<content type='text'>
Current code would set owner uid/gid explicitly to 0/0 on start
even if none was specified. Fix it.

Cherry picked from commit 8bdc329:
&gt; Change-Id: I72dec9e79c51bd1eb3af5334c42b7c23b01d0258
&gt; BUG: 1040275
&gt; Signed-off-by: Anand Avati &lt;avati@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/6476
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Tested-by: Lukáš Bezdička &lt;lukas.bezdicka@gooddata.com&gt;
&gt; Reviewed-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
&gt; Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;

Change-Id: Ie0396c1a4e6e0979ea9c855d33db963544a75c42
BUG: 1095971
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/7720
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Current code would set owner uid/gid explicitly to 0/0 on start
even if none was specified. Fix it.

Cherry picked from commit 8bdc329:
&gt; Change-Id: I72dec9e79c51bd1eb3af5334c42b7c23b01d0258
&gt; BUG: 1040275
&gt; Signed-off-by: Anand Avati &lt;avati@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/6476
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Tested-by: Lukáš Bezdička &lt;lukas.bezdicka@gooddata.com&gt;
&gt; Reviewed-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
&gt; Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;

Change-Id: Ie0396c1a4e6e0979ea9c855d33db963544a75c42
BUG: 1095971
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/7720
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>write-behind: track filesize when doing extending writes</title>
<updated>2014-05-09T14:33:39+00:00</updated>
<author>
<name>Niels de Vos</name>
<email>ndevos@redhat.com</email>
</author>
<published>2014-02-28T09:03:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=a256094f34df6500bcd19845fd0f32a9f3690751'/>
<id>a256094f34df6500bcd19845fd0f32a9f3690751</id>
<content type='text'>
A program that calls mmap() on a newly created sparse file, may receive
a SIGBUS signal. If SIGBUS is not handled, a segmentation fault will
occur and the program will exit.

A bug in the write-behind translator can cause the creation of a sparse
file created with open(), seek(), write() to be cached. The last write()
may not be sent to the server, until write-behind deems this necessary.

* open(.., O_TRUNC, ...)/creat() the file, it is 0 bytes big
* seek() into the file, use offset 31
* write() 1 byte to the file
* the range from byte 0-30 are unwritten so called 'sparse'

The following illustration tries to capture this:

    Legend:
    [ = start of file
    _ = unallocated/unwritten bytes
    # = allocated bytes in the file
    ] = end of file

    [_______________#]
     |              |
     '- byte 0      '- byte 31

Without this change, reading from byte 0-30 will return an error, and
reading the same area through an mmap()'d pointer will trigger a SIGBUS.
Reading from this range did not trigger the outstanding write() to be
flushed. The brick that receives the read() (translated over the network
from mmap()) does not know that the file has been extended, and returns
-EINVAL. This error gets transported back from the brick to the
glusterfs-fuse client, and translated by the Linux kernel/VFS into
SIGBUS triggered by mmap().

In order to solve this, a new attribute to the wb_inode structure is
introduced; the current size of the file. All FOPs that can modify the
size, are expected to update wb_inode-&gt;size. This makes it possible for
extending writes with an offset bigger than EOF to mark the unwritten
area as modified/pending.

Cherry picked from commit b0515e2a4a08b657ef7e9715fb8c6222c700e78c:
&gt; Change-Id: If5ba6646732e6be26568541ea9b12852a5d0b988
&gt; BUG: 1058663
&gt; Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/6835
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
&gt; Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;

Change-Id: Ic73288202c6cb37d8c066628e9c489c6fade49bd
BUG: 1071191
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/7166
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A program that calls mmap() on a newly created sparse file, may receive
a SIGBUS signal. If SIGBUS is not handled, a segmentation fault will
occur and the program will exit.

A bug in the write-behind translator can cause the creation of a sparse
file created with open(), seek(), write() to be cached. The last write()
may not be sent to the server, until write-behind deems this necessary.

* open(.., O_TRUNC, ...)/creat() the file, it is 0 bytes big
* seek() into the file, use offset 31
* write() 1 byte to the file
* the range from byte 0-30 are unwritten so called 'sparse'

The following illustration tries to capture this:

    Legend:
    [ = start of file
    _ = unallocated/unwritten bytes
    # = allocated bytes in the file
    ] = end of file

    [_______________#]
     |              |
     '- byte 0      '- byte 31

Without this change, reading from byte 0-30 will return an error, and
reading the same area through an mmap()'d pointer will trigger a SIGBUS.
Reading from this range did not trigger the outstanding write() to be
flushed. The brick that receives the read() (translated over the network
from mmap()) does not know that the file has been extended, and returns
-EINVAL. This error gets transported back from the brick to the
glusterfs-fuse client, and translated by the Linux kernel/VFS into
SIGBUS triggered by mmap().

In order to solve this, a new attribute to the wb_inode structure is
introduced; the current size of the file. All FOPs that can modify the
size, are expected to update wb_inode-&gt;size. This makes it possible for
extending writes with an offset bigger than EOF to mark the unwritten
area as modified/pending.

Cherry picked from commit b0515e2a4a08b657ef7e9715fb8c6222c700e78c:
&gt; Change-Id: If5ba6646732e6be26568541ea9b12852a5d0b988
&gt; BUG: 1058663
&gt; Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/6835
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
&gt; Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;

Change-Id: Ic73288202c6cb37d8c066628e9c489c6fade49bd
BUG: 1071191
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/7166
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
