<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/cli/src, branch v7.5</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>cli: duplicate defns of cli_default_conn_timeout and cli_ten_minutes_timeout</title>
<updated>2020-01-21T13:36:15+00:00</updated>
<author>
<name>Kaleb S. KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2020-01-02T12:46:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=5ccd50176b4e45abf528ef6870c332ef5f05448e'/>
<id>5ccd50176b4e45abf528ef6870c332ef5f05448e</id>
<content type='text'>
Winter is coming. So is gcc-10.

Compiling with gcc-10-20191219 snapshot reveals dupe defns of
cli_default_conn_timeout and cli_ten_minutes_timeout in
.../cli/src/cli.[ch] due to missing extern decl.

There are many changes coming in gcc-10 described in
https://gcc.gnu.org/gcc-10/changes.html

compiling cli.c with gcc-9 we see:
   ...
        .quad   .LC88
        .comm   cli_ten_minutes_timeout,4,4
        .comm   cli_default_conn_timeout,4,4
        .text
   .Letext0:
   ...

and with gcc-10:
   ...
        .quad   .LC88
        .globl  cli_ten_minutes_timeout
        .bss
        .align 4
        .type   cli_ten_minutes_timeout, @object
        .size   cli_ten_minutes_timeout, 4
   cli_ten_minutes_timeout:
        .zero   4
        .globl  cli_default_conn_timeout
        .align 4
        .type   cli_default_conn_timeout, @object
        .size   cli_default_conn_timeout, 4
   cli_default_conn_timeout:
        .zero   4
        .text
   .Letext0:
   ...

which is reflected in the .o file as (gcc-9):
...
0000000000000004 C cli_ten_minutes_timeout
0000000000000004 C cli_default_conn_timeout
...

and (gcc-10):
...
0000000000000020 B cli_ten_minutes_timeout
0000000000000024 B cli_default_conn_timeout
...

See nm(1) and ld(1) for a description C (common) and B (BSS) and how
they are treated by the linker.

Note: gcc-10 will land in Fedora-32!

Change-Id: I54ea485736a4910254eeb21222ad263721cdef3c
Fixes: bz#1793492
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Winter is coming. So is gcc-10.

Compiling with gcc-10-20191219 snapshot reveals dupe defns of
cli_default_conn_timeout and cli_ten_minutes_timeout in
.../cli/src/cli.[ch] due to missing extern decl.

There are many changes coming in gcc-10 described in
https://gcc.gnu.org/gcc-10/changes.html

compiling cli.c with gcc-9 we see:
   ...
        .quad   .LC88
        .comm   cli_ten_minutes_timeout,4,4
        .comm   cli_default_conn_timeout,4,4
        .text
   .Letext0:
   ...

and with gcc-10:
   ...
        .quad   .LC88
        .globl  cli_ten_minutes_timeout
        .bss
        .align 4
        .type   cli_ten_minutes_timeout, @object
        .size   cli_ten_minutes_timeout, 4
   cli_ten_minutes_timeout:
        .zero   4
        .globl  cli_default_conn_timeout
        .align 4
        .type   cli_default_conn_timeout, @object
        .size   cli_default_conn_timeout, 4
   cli_default_conn_timeout:
        .zero   4
        .text
   .Letext0:
   ...

which is reflected in the .o file as (gcc-9):
...
0000000000000004 C cli_ten_minutes_timeout
0000000000000004 C cli_default_conn_timeout
...

and (gcc-10):
...
0000000000000020 B cli_ten_minutes_timeout
0000000000000024 B cli_default_conn_timeout
...

See nm(1) and ld(1) for a description C (common) and B (BSS) and how
they are treated by the linker.

Note: gcc-10 will land in Fedora-32!

Change-Id: I54ea485736a4910254eeb21222ad263721cdef3c
Fixes: bz#1793492
Signed-off-by: Kaleb S. KEITHLEY &lt;kkeithle@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>event: rename event_XXX with gf_ prefixed</title>
<updated>2019-08-21T06:13:38+00:00</updated>
<author>
<name>Xiubo Li</name>
<email>xiubli@redhat.com</email>
</author>
<published>2019-07-26T04:34:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=acbabe3d916d763a0bb13e7df876cac61ca5b160'/>
<id>acbabe3d916d763a0bb13e7df876cac61ca5b160</id>
<content type='text'>
I hit one crash issue when using the libgfapi.

In the libgfapi it will call glfs_poller() --&gt; event_dispatch()
in file api/src/glfs.c:721, and the event_dispatch() is defined
by libgluster locally, the problem is the name of event_dispatch()
is the extremly the same with the one from libevent package form
the OS.

For example, if a executable program Foo, which will also use and
link the libevent and the libgfapi at the same time, I can hit the
crash, like:

kernel: glfs_glfspoll[68486]: segfault at 1c0 ip 00007fef006fd2b8 sp
00007feeeaffce30 error 4 in libevent-2.0.so.5.1.9[7fef006ed000+46000]

The link for Foo is:
lib_foo_LADD = -levent $(GFAPI_LIBS)
It will crash.

This is because the glfs_poller() is calling the event_dispatch() from
the libevent, not the libglsuter.

The gfapi link info :
GFAPI_LIBS = -lacl -lgfapi -lglusterfs -lgfrpc -lgfxdr -luuid

If I link Foo like:
lib_foo_LADD = $(GFAPI_LIBS) -levent
It will works well without any problem.

And if Foo call one private lib, such as handler_glfs.so, and the
handler_glfs.so will link the GFAPI_LIBS directly, while the Foo won't
and it will dlopen(handler_glfs.so), then the crash will be hit everytime.

The link info will be:
foo_LADD = -levent
libhandler_glfs_LIBADD = $(GFAPI_LIBS)

I can avoid the crash temporarily by linking the GFAPI_LIBS in Foo too like:
foo_LADD = $(GFAPI_LIBS) -levent
libhandler_glfs_LIBADD = $(GFAPI_LIBS)

But this is ugly since the Foo won't use any APIs from the GFAPI_LIBS.

And in some cases when the --as-needed link option is added(on many dists
it is added as default), then the crash is back again, the above workaround
won't work.

Backport of:
&gt; https://review.gluster.org/#/c/glusterfs/+/23110/
&gt; Change-Id: I38f0200b941bd1cff4bf3066fca2fc1f9a5263aa
&gt; Fixes: #699
&gt; Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;

Change-Id: I38f0200b941bd1cff4bf3066fca2fc1f9a5263aa
updates: bz#1740519
Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;
(cherry picked from commit 799edc73c3d4f694c365c6a7c27c9ab8eed5f260)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I hit one crash issue when using the libgfapi.

In the libgfapi it will call glfs_poller() --&gt; event_dispatch()
in file api/src/glfs.c:721, and the event_dispatch() is defined
by libgluster locally, the problem is the name of event_dispatch()
is the extremly the same with the one from libevent package form
the OS.

For example, if a executable program Foo, which will also use and
link the libevent and the libgfapi at the same time, I can hit the
crash, like:

kernel: glfs_glfspoll[68486]: segfault at 1c0 ip 00007fef006fd2b8 sp
00007feeeaffce30 error 4 in libevent-2.0.so.5.1.9[7fef006ed000+46000]

The link for Foo is:
lib_foo_LADD = -levent $(GFAPI_LIBS)
It will crash.

This is because the glfs_poller() is calling the event_dispatch() from
the libevent, not the libglsuter.

The gfapi link info :
GFAPI_LIBS = -lacl -lgfapi -lglusterfs -lgfrpc -lgfxdr -luuid

If I link Foo like:
lib_foo_LADD = $(GFAPI_LIBS) -levent
It will works well without any problem.

And if Foo call one private lib, such as handler_glfs.so, and the
handler_glfs.so will link the GFAPI_LIBS directly, while the Foo won't
and it will dlopen(handler_glfs.so), then the crash will be hit everytime.

The link info will be:
foo_LADD = -levent
libhandler_glfs_LIBADD = $(GFAPI_LIBS)

I can avoid the crash temporarily by linking the GFAPI_LIBS in Foo too like:
foo_LADD = $(GFAPI_LIBS) -levent
libhandler_glfs_LIBADD = $(GFAPI_LIBS)

But this is ugly since the Foo won't use any APIs from the GFAPI_LIBS.

And in some cases when the --as-needed link option is added(on many dists
it is added as default), then the crash is back again, the above workaround
won't work.

Backport of:
&gt; https://review.gluster.org/#/c/glusterfs/+/23110/
&gt; Change-Id: I38f0200b941bd1cff4bf3066fca2fc1f9a5263aa
&gt; Fixes: #699
&gt; Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;

Change-Id: I38f0200b941bd1cff4bf3066fca2fc1f9a5263aa
updates: bz#1740519
Signed-off-by: Xiubo Li &lt;xiubli@redhat.com&gt;
(cherry picked from commit 799edc73c3d4f694c365c6a7c27c9ab8eed5f260)
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd/thin-arbiter: Thin-arbiter integration with GD1</title>
<updated>2019-07-04T07:42:11+00:00</updated>
<author>
<name>Vishal Pandey</name>
<email>vpandey@redhat.com</email>
</author>
<published>2019-04-24T08:07:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=08c87ae4208b73f4f183f7b54ebcb373e8bc0ede'/>
<id>08c87ae4208b73f4f183f7b54ebcb373e8bc0ede</id>
<content type='text'>
gluster volume create &lt;VOLNAME&gt; replica 2 thin-arbiter 1 &lt;host1&gt;:&lt;brick1&gt; &lt;host2&gt;:&lt;brick2&gt;
&lt;thin-arbiter-host&gt;:&lt;path-to-store-replica-id-file&gt; [force]

The changes have been made in a way that the last brick in the bricks list
will be treated as the thin-arbiter.
GD1 will be manipulated to consider replica count to be as 2 and continue creating the
volume like any other replica 2 volume but since thin-arbiter volumes need ta-brick
client xlator entries for each subvolume in fuse volfile, volfile generation is
modified in a way to inject these entries seperately in the volfile for every subvolume.

Few more additions -
1- Save the volinfo with new fields ta_bricks list and thin_arbiter_count.
2- Introduce a new option client.ta-brick-port to add remote-port to ta-brick xlator entry
   in fuse volfiles. The option can be set using the following CLI syntax -
   gluster volume set &lt;VOLNAME&gt; client.ta-brick-port &lt;PORTNO.&gt;
3- Volume Info will contain a Thin-Arbiter-path entry to distinguish
   from other replicate volumes.

Change-Id: Ib434e2313b29716f32476c6c211d282c4ef39406
Updates #687
Signed-off-by: Vishal Pandey &lt;vpandey@redhat.com&gt;
(cherry picked from commit 9b223b15ab69fce4076de036ee162f36a058bcd2)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gluster volume create &lt;VOLNAME&gt; replica 2 thin-arbiter 1 &lt;host1&gt;:&lt;brick1&gt; &lt;host2&gt;:&lt;brick2&gt;
&lt;thin-arbiter-host&gt;:&lt;path-to-store-replica-id-file&gt; [force]

The changes have been made in a way that the last brick in the bricks list
will be treated as the thin-arbiter.
GD1 will be manipulated to consider replica count to be as 2 and continue creating the
volume like any other replica 2 volume but since thin-arbiter volumes need ta-brick
client xlator entries for each subvolume in fuse volfile, volfile generation is
modified in a way to inject these entries seperately in the volfile for every subvolume.

Few more additions -
1- Save the volinfo with new fields ta_bricks list and thin_arbiter_count.
2- Introduce a new option client.ta-brick-port to add remote-port to ta-brick xlator entry
   in fuse volfiles. The option can be set using the following CLI syntax -
   gluster volume set &lt;VOLNAME&gt; client.ta-brick-port &lt;PORTNO.&gt;
3- Volume Info will contain a Thin-Arbiter-path entry to distinguish
   from other replicate volumes.

Change-Id: Ib434e2313b29716f32476c6c211d282c4ef39406
Updates #687
Signed-off-by: Vishal Pandey &lt;vpandey@redhat.com&gt;
(cherry picked from commit 9b223b15ab69fce4076de036ee162f36a058bcd2)
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: don't fail if logging initialize fails</title>
<updated>2019-06-17T03:55:06+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amarts@redhat.com</email>
</author>
<published>2019-06-14T09:30:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=632c10b5e976079d825f8808b5e33ab2e1dda469'/>
<id>632c10b5e976079d825f8808b5e33ab2e1dda469</id>
<content type='text'>
in many cases, gluster's cli can run as non-privileged mode
(like in geo-rep non-root setup). Just because logging fails
in cli, lets not fail the overall process. Not much of
debugging help in CLI logs anyways. Most of the debugging
happens once the call reaches server (glusterd).

Fixes: bz#1535511
Change-Id: I9f07c61b8c3acc95ec08230ff539a35dfd0ff9dc
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in many cases, gluster's cli can run as non-privileged mode
(like in geo-rep non-root setup). Just because logging fails
in cli, lets not fail the overall process. Not much of
debugging help in CLI logs anyways. Most of the debugging
happens once the call reaches server (glusterd).

Fixes: bz#1535511
Change-Id: I9f07c61b8c3acc95ec08230ff539a35dfd0ff9dc
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build: always build glusterfs-cli to allow monitoring/managing from clients</title>
<updated>2019-06-15T03:57:04+00:00</updated>
<author>
<name>Niels de Vos</name>
<email>ndevos@redhat.com</email>
</author>
<published>2019-06-14T10:43:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=82b8458ac6d31c72dc7a2f69df7f50bb1e4b7618'/>
<id>82b8458ac6d31c72dc7a2f69df7f50bb1e4b7618</id>
<content type='text'>
Fixes: bz#1720615
Change-Id: I5071f3255ff615113b36b08cd5326be6e37d907d
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes: bz#1720615
Change-Id: I5071f3255ff615113b36b08cd5326be6e37d907d
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: Remove-brick warning seems unnecessary</title>
<updated>2019-06-12T16:08:19+00:00</updated>
<author>
<name>Shwetha K Acharya</name>
<email>sacharya@redhat.com</email>
</author>
<published>2019-06-03T12:35:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=4d51b878c9c41e81f965569a4fe19a95a0a42c25'/>
<id>4d51b878c9c41e81f965569a4fe19a95a0a42c25</id>
<content type='text'>
As force-migration option is disabled by default,
the warning seems unnessary.

Rephrased the warning to make best sense out of it.

fixes: bz#1712668
Change-Id: Ia18c3c5e7b3fec808fce2194ca0504a837708822
Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As force-migration option is disabled by default,
the warning seems unnessary.

Rephrased the warning to make best sense out of it.

fixes: bz#1712668
Change-Id: Ia18c3c5e7b3fec808fce2194ca0504a837708822
Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix some "Null pointer dereference" coverity issues</title>
<updated>2019-05-26T13:59:13+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@redhat.com</email>
</author>
<published>2019-05-22T15:46:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=5d88111a142b3c37e92bdd36699a04fd054d27f4'/>
<id>5d88111a142b3c37e92bdd36699a04fd054d27f4</id>
<content type='text'>
This patch fixes the following CID's:

  * 1124829
  * 1274075
  * 1274083
  * 1274128
  * 1274135
  * 1274141
  * 1274143
  * 1274197
  * 1274205
  * 1274210
  * 1274211
  * 1288801
  * 1398629

Change-Id: Ia7c86cfab3245b20777ffa296e1a59748040f558
Updates: bz#789278
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes the following CID's:

  * 1124829
  * 1274075
  * 1274083
  * 1274128
  * 1274135
  * 1274141
  * 1274143
  * 1274197
  * 1274205
  * 1274210
  * 1274211
  * 1288801
  * 1398629

Change-Id: Ia7c86cfab3245b20777ffa296e1a59748040f558
Updates: bz#789278
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>geo-rep: Geo-rep help text issue</title>
<updated>2019-05-23T15:25:25+00:00</updated>
<author>
<name>Shwetha K Acharya</name>
<email>sacharya@redhat.com</email>
</author>
<published>2019-05-09T05:13:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=38f23ad8333faa2dd0d8ab23104aad4824fbe4a3'/>
<id>38f23ad8333faa2dd0d8ab23104aad4824fbe4a3</id>
<content type='text'>
Modified Geo-rep help text for better sanity.

fixes: bz#1652887

Change-Id: I40ef7ef709eaecf0125ab4b4a7517e2c5d1ef4a0
Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Modified Geo-rep help text for better sanity.

fixes: bz#1652887

Change-Id: I40ef7ef709eaecf0125ab4b4a7517e2c5d1ef4a0
Signed-off-by: Shwetha K Acharya &lt;sacharya@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli:  Fixed typos</title>
<updated>2019-05-23T09:17:27+00:00</updated>
<author>
<name>N Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2019-05-21T11:21:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e1d2ce02135819898f166de9d9903404eb812046'/>
<id>e1d2ce02135819898f166de9d9903404eb812046</id>
<content type='text'>
Change-Id: I14957c5161f31d5dfc6cf56f8d7ccf4d39372f39
fixes: bz#1711820
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I14957c5161f31d5dfc6cf56f8d7ccf4d39372f39
fixes: bz#1711820
Signed-off-by: N Balachandran &lt;nbalacha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: Validate invalid slave url</title>
<updated>2019-05-11T11:09:06+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2019-04-23T07:11:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=af4d9131c8d09907853ee2f6e30b2a9bd80f3c84'/>
<id>af4d9131c8d09907853ee2f6e30b2a9bd80f3c84</id>
<content type='text'>
This patch validates the invalid slave url
in cli itself and throws appropriate error.

fixes: bz#1098991
Change-Id: I278e2a04a4d619d2c2d1db0dd56ab5bdf7e7f469
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch validates the invalid slave url
in cli itself and throws appropriate error.

fixes: bz#1098991
Change-Id: I278e2a04a4d619d2c2d1db0dd56ab5bdf7e7f469
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
