<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/cli/src/cli-rpc-ops.c, branch v8.0alpha</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>cluster/afr: Removing unsupported options from code base to improve coverage</title>
<updated>2020-04-07T04:26:33+00:00</updated>
<author>
<name>karthik-us</name>
<email>ksubrahm@redhat.com</email>
</author>
<published>2020-04-02T07:33:35+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=e1ad1483e0e82d70fcc32311b7842bc9a77c04aa'/>
<id>e1ad1483e0e82d70fcc32311b7842bc9a77c04aa</id>
<content type='text'>
Support for gluster volume heal &lt;volname&gt; info healed/heal-failed
was removed by commit bb02cfb56ae08f56df4452c2b948fa962ae1212b in
release-3.6. cli parser will display the usage message in all the
supported versions whenever these clis are run, leading to some
dead code in the latest branches. Since support for these clis
were removed long back, this should not give any backward
compatibility issues as well. Hence removing the dead code from
the code base which will lead to better code coverage by the
regression runs as well.

Updates: #1052
Change-Id: I0c2b061469caf233c06d9699b0d159ce48e240b9
Signed-off-by: karthik-us &lt;ksubrahm@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support for gluster volume heal &lt;volname&gt; info healed/heal-failed
was removed by commit bb02cfb56ae08f56df4452c2b948fa962ae1212b in
release-3.6. cli parser will display the usage message in all the
supported versions whenever these clis are run, leading to some
dead code in the latest branches. Since support for these clis
were removed long back, this should not give any backward
compatibility issues as well. Hence removing the dead code from
the code base which will lead to better code coverage by the
regression runs as well.

Updates: #1052
Change-Id: I0c2b061469caf233c06d9699b0d159ce48e240b9
Signed-off-by: karthik-us &lt;ksubrahm@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: display the error while probing the localhost</title>
<updated>2020-03-13T06:22:35+00:00</updated>
<author>
<name>Sanju Rakonde</name>
<email>srakonde@redhat.com</email>
</author>
<published>2020-03-10T09:35:08+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=2668e9f1892dbe898e41e3a14701258d78cb8f46'/>
<id>2668e9f1892dbe898e41e3a14701258d78cb8f46</id>
<content type='text'>
With bc6e206c6, we regressed in displaying the error
message when a user tries to probe localhost. With
this change, we display "probe on localhost not needed"
message to the user.

credits: Sachin Prabhu &lt;sprabhu@redhat.com&gt;

fixes: bz#1810042

Change-Id: Ibf82b5a658c371c08290a0b4f655e5ac5f436c06
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With bc6e206c6, we regressed in displaying the error
message when a user tries to probe localhost. With
this change, we display "probe on localhost not needed"
message to the user.

credits: Sachin Prabhu &lt;sprabhu@redhat.com&gt;

fixes: bz#1810042

Change-Id: Ibf82b5a658c371c08290a0b4f655e5ac5f436c06
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli - removing fetch of unnecessary items.</title>
<updated>2020-01-21T13:29:49+00:00</updated>
<author>
<name>Barak Sason Rofman</name>
<email>bsasonro@redhat.com</email>
</author>
<published>2019-12-04T16:48:23+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=61737898e84d30e02117baa7431f89cafff27f56'/>
<id>61737898e84d30e02117baa7431f89cafff27f56</id>
<content type='text'>
Somem methods dict_get...(...) values and then not use them anywhere.
Removed found occurrences.

fixes: #753

Change-Id: Iaeb8f4cec18f76078f6b2f4e4bd6f9795a3467bc
Signed-off-by: Barak Sason Rofman &lt;bsasonro@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Somem methods dict_get...(...) values and then not use them anywhere.
Removed found occurrences.

fixes: #753

Change-Id: Iaeb8f4cec18f76078f6b2f4e4bd6f9795a3467bc
Signed-off-by: Barak Sason Rofman &lt;bsasonro@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli - fixing a coverity issue</title>
<updated>2020-01-07T08:17:51+00:00</updated>
<author>
<name>Barak Sason Rofman</name>
<email>bsasonro@redhat.com</email>
</author>
<published>2020-01-05T10:11:07+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=10b0d19513100c3f7edf00936ea5ec06fc3f80a5'/>
<id>10b0d19513100c3f7edf00936ea5ec06fc3f80a5</id>
<content type='text'>
Removed unused variable.

fixes: CID#1412106
updates: bz#789278

Change-Id: I1d4e1c1625cecf882d51e9cf4f5290383f63d405
Signed-off-by: Barak Sason Rofman &lt;bsasonro@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removed unused variable.

fixes: CID#1412106
updates: bz#789278

Change-Id: I1d4e1c1625cecf882d51e9cf4f5290383f63d405
Signed-off-by: Barak Sason Rofman &lt;bsasonro@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli-rpc-ops.c: cleanups</title>
<updated>2019-12-19T09:12:36+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-10-28T19:29:50+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=bc6e206c6d29234a0b167b142d20c62ffd529f15'/>
<id>bc6e206c6d29234a0b167b142d20c62ffd529f15</id>
<content type='text'>
1. Move functions and structs to static
2. Use dictionary functions with fixed key length.
3. Reduce key length when not needed.
4. Use const char* for some messages.
5. Use fixed strings for some logs which is repeated in the code.
6. Remove redundant checks. Specifically, cli_to_glusterd() does
NULL checks already, so no need to do it before calling it.
7. Aligned some messages - not sure why they were cut over several
lines, but it made grep on the code harder.
8. Move dictionary fetching of values closer to where they are
actually used.

Overall, object size is ~4 smaller, hopefully without functional changes.

There's more that can be done, but as this is a very long (&gt;10K lines)
file, I think it's enough for one change.
Specifically, some functions fetch values from the dictionary
without using it - this is a bit of a waste.
Filed https://github.com/gluster/glusterfs/issues/753 about it.

Change-Id: I31f88d94ab25398e00aef2ea84a8c4af9383b75b
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>
1. Move functions and structs to static
2. Use dictionary functions with fixed key length.
3. Reduce key length when not needed.
4. Use const char* for some messages.
5. Use fixed strings for some logs which is repeated in the code.
6. Remove redundant checks. Specifically, cli_to_glusterd() does
NULL checks already, so no need to do it before calling it.
7. Aligned some messages - not sure why they were cut over several
lines, but it made grep on the code harder.
8. Move dictionary fetching of values closer to where they are
actually used.

Overall, object size is ~4 smaller, hopefully without functional changes.

There's more that can be done, but as this is a very long (&gt;10K lines)
file, I think it's enough for one change.
Specifically, some functions fetch values from the dictionary
without using it - this is a bit of a waste.
Filed https://github.com/gluster/glusterfs/issues/753 about it.

Change-Id: I31f88d94ab25398e00aef2ea84a8c4af9383b75b
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli-*: make some structs static to reduce space consumed.</title>
<updated>2019-11-26T06:59:31+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-10-04T20:14:08+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=b7411e36514f2e564b3808679732ad8a5c1d9efd'/>
<id>b7411e36514f2e564b3808679732ad8a5c1d9efd</id>
<content type='text'>
There's a small difference when structs are defined static.
Whenever possible, define them as such.

Specifically, before:
   text    data     bss     dec     hex filename
    678     216       0     894     37e ./cli/src/cli-cmd-misc.o
 150024    1264      16  151304   24f08 ./cli/src/cli-rpc-ops.o
  71980      64       0   72044   1196c ./cli/src/cli-cmd-parser.o
  66189       4      16   66209   102a1 ./cli/src/cli-xml-output.o

After:
   text	   data	    bss	    dec	    hex	filename
    670	    216	      0	    886	    376	./cli/src/cli-cmd-misc.o
 149848	   1392	     16	 151256	  24ed8	./cli/src/cli-rpc-ops.o
  70346	   1320	      0	  71666	  117f2	./cli/src/cli-cmd-parser.o
  66157	      4	     16	  66177	  10281	./cli/src/cli-xml-output.o

Change-Id: I206bd895290595d79fac7b26eee66f4279b50f92
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>
There's a small difference when structs are defined static.
Whenever possible, define them as such.

Specifically, before:
   text    data     bss     dec     hex filename
    678     216       0     894     37e ./cli/src/cli-cmd-misc.o
 150024    1264      16  151304   24f08 ./cli/src/cli-rpc-ops.o
  71980      64       0   72044   1196c ./cli/src/cli-cmd-parser.o
  66189       4      16   66209   102a1 ./cli/src/cli-xml-output.o

After:
   text	   data	    bss	    dec	    hex	filename
    670	    216	      0	    886	    376	./cli/src/cli-cmd-misc.o
 149848	   1392	     16	 151256	  24ed8	./cli/src/cli-rpc-ops.o
  70346	   1320	      0	  71666	  117f2	./cli/src/cli-cmd-parser.o
  66157	      4	     16	  66177	  10281	./cli/src/cli-xml-output.o

Change-Id: I206bd895290595d79fac7b26eee66f4279b50f92
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: display detailed rebalance info</title>
<updated>2019-11-12T06:17:06+00:00</updated>
<author>
<name>Sanju Rakonde</name>
<email>srakonde@redhat.com</email>
</author>
<published>2019-10-22T09:36:29+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=50b6806bb2697246bdc1b9ac5ef19af61584e010'/>
<id>50b6806bb2697246bdc1b9ac5ef19af61584e010</id>
<content type='text'>
Problem: When one of the node is down in cluster,
rebalance status is not displaying detailed
information.

Cause: In glusterd_volume_rebalance_use_rsp_dict()
we are aggregating rsp from all the nodes into a
dictionary and sending it to cli for printing. While
assigning a index to keys we are considering all the
peers instead of considering only the peers which are
up. Because of which, index is not reaching till 1.
while parsing the rsp cli unable to find status-1
key in dictionary and going out without printing
any information.

Solution: The simplest fix for this without much
code change is to continue to look for other keys
when status-1 key is not found.

fixes: bz#1764119

Change-Id: I0062839933c9706119eb85416256eade97e976dc
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: When one of the node is down in cluster,
rebalance status is not displaying detailed
information.

Cause: In glusterd_volume_rebalance_use_rsp_dict()
we are aggregating rsp from all the nodes into a
dictionary and sending it to cli for printing. While
assigning a index to keys we are considering all the
peers instead of considering only the peers which are
up. Because of which, index is not reaching till 1.
while parsing the rsp cli unable to find status-1
key in dictionary and going out without printing
any information.

Solution: The simplest fix for this without much
code change is to continue to look for other keys
when status-1 key is not found.

fixes: bz#1764119

Change-Id: I0062839933c9706119eb85416256eade97e976dc
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "glusterd: (storhaug) remove ganesha (843e1b0)"</title>
<updated>2019-08-24T02:08:57+00:00</updated>
<author>
<name>Jiffin Tony Thottan</name>
<email>jthottan@redhat.com</email>
</author>
<published>2017-10-16T08:54:29+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=673f2f90f35e5ea381bd22a43403278f89c957a5'/>
<id>673f2f90f35e5ea381bd22a43403278f89c957a5</id>
<content type='text'>
please note as an additional change, macro GLUSTERD_GET_SNAP_DIR
moved from glusterd-store.c to glusterd-snapshot-utils.h

Change-Id: I811efefc148453fe32e4f0d322e80455447cec71
updates: #663
Signed-off-by: Jiffin Tony Thottan &lt;jthottan@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
please note as an additional change, macro GLUSTERD_GET_SNAP_DIR
moved from glusterd-store.c to glusterd-snapshot-utils.h

Change-Id: I811efefc148453fe32e4f0d322e80455447cec71
updates: #663
Signed-off-by: Jiffin Tony Thottan &lt;jthottan@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Multiple files: get trivial stuff done before lock</title>
<updated>2019-08-01T04:12:07+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2019-06-07T22:22:27+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d68e426263708334945dff69b88218ed71a48033'/>
<id>d68e426263708334945dff69b88218ed71a48033</id>
<content type='text'>
Initialize a dictionary for example seems to be prefectly fine to be done
before taking a lock.

Change-Id: Ib29516c4efa8f0e2b526d512beab488fcd16d2e7
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>
Initialize a dictionary for example seems to be prefectly fine to be done
before taking a lock.

Change-Id: Ib29516c4efa8f0e2b526d512beab488fcd16d2e7
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: Remove Wformat-truncation compiler warning</title>
<updated>2019-07-02T07:29:32+00:00</updated>
<author>
<name>Sheetal Pamecha</name>
<email>spamecha@redhat.com</email>
</author>
<published>2019-07-01T15:18:31+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=080827829eabd3cbed1a7feaa37de091834fcbb1'/>
<id>080827829eabd3cbed1a7feaa37de091834fcbb1</id>
<content type='text'>
This warning is issued due to unhandled output truncation.
As in the code, truncation is expected, we can remove this
warning by placing a check on the return value of the function
and handling it.
In this way, the warning will not be issued.

Change-Id: I1820b58fe9a7601961c20944b259df322db35057
updates: bz#1193929
Signed-off-by: Sheetal Pamecha &lt;spamecha@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This warning is issued due to unhandled output truncation.
As in the code, truncation is expected, we can remove this
warning by placing a check on the return value of the function
and handling it.
In this way, the warning will not be issued.

Change-Id: I1820b58fe9a7601961c20944b259df322db35057
updates: bz#1193929
Signed-off-by: Sheetal Pamecha &lt;spamecha@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
