<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gluster-block.git/rpc, branch v0.3</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/gluster-block.git/'/>
<entry>
<title>delete/rollback: check for matching gbid before deleting a block</title>
<updated>2017-10-09T05:43:20+00:00</updated>
<author>
<name>Prasanna Kumar Kalever</name>
<email>prasanna.kalever@redhat.com</email>
</author>
<published>2017-08-03T09:05:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/gluster-block.git/commit/?id=e6ed5b53cf33b4315ee2846a9f773cd672a5de8c'/>
<id>e6ed5b53cf33b4315ee2846a9f773cd672a5de8c</id>
<content type='text'>
Currently we are just checking for blockname in targetcli list output, if it
exist we will delete the backend.

We do not check if block belongs to a given volume (say vol1), because of which
a rollback on a failure to create block with same name, on same node but on a
different volume (say vol2) deletes block backend belonging to vol1.

Solution:
only if blockname + gbid matches continue delete.

Change-Id: I396c228dad3cf4f51cc6676a266b837bdf6040c7
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently we are just checking for blockname in targetcli list output, if it
exist we will delete the backend.

We do not check if block belongs to a given volume (say vol1), because of which
a rollback on a failure to create block with same name, on same node but on a
different volume (say vol2) deletes block backend belonging to vol1.

Solution:
only if blockname + gbid matches continue delete.

Change-Id: I396c228dad3cf4f51cc6676a266b837bdf6040c7
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>socket: switch to MT-safe get host addr info</title>
<updated>2017-09-19T05:50:32+00:00</updated>
<author>
<name>Prasanna Kumar Kalever</name>
<email>prasanna.kalever@redhat.com</email>
</author>
<published>2017-09-19T03:13:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/gluster-block.git/commit/?id=149c72ca069fd5c1fb8960607d7443536995d235'/>
<id>149c72ca069fd5c1fb8960607d7443536995d235</id>
<content type='text'>
This was fixed in an attempt to clean the sockfd leaks

Change-Id: Icd82635134050c83167a48b451b347f5c2b9bf39
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was fixed in an attempt to clean the sockfd leaks

Change-Id: Icd82635134050c83167a48b451b347f5c2b9bf39
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc: switch to MT-safe block RPC routines</title>
<updated>2017-09-19T04:07:48+00:00</updated>
<author>
<name>Prasanna Kumar Kalever</name>
<email>prasanna.kalever@redhat.com</email>
</author>
<published>2017-09-18T14:19:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/gluster-block.git/commit/?id=3d0953aa99eed434a1977de3131b264c48fca64b'/>
<id>3d0953aa99eed434a1977de3131b264c48fca64b</id>
<content type='text'>
blockResponse *
block_delete_1(blockDelete *argp, CLIENT *clnt)
{
        static blockResponse clnt_res; &lt;&lt;&lt;&lt;&lt;&lt;-------- Same memory is used by everyone

        memset((char *)&amp;clnt_res, 0, sizeof(clnt_res)); &lt;&lt;&lt;&lt;&lt;---- Here memset is happening
        if (clnt_call (clnt, BLOCK_DELETE,
                (xdrproc_t) xdr_blockDelete, (caddr_t) argp,
                (xdrproc_t) xdr_blockResponse, (caddr_t) &amp;clnt_res,
                TIMEOUT) != RPC_SUCCESS) {
                return (NULL);
        }
        return (&amp;clnt_res); &lt;&lt;&lt;&lt;&lt;---- ptr to this memory is returned.
}

So while Thread-1 is returned "return (&amp;clnt_res);" another thread could be
doing "memset((char *)&amp;clnt_res, 0, sizeof(clnt_res));"

This seem to be a day-1 gluster-blockd bug from the looks of it.

Change-Id: I3fc76d7814c4fe5b286577586ec44d752dcc73f0
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
blockResponse *
block_delete_1(blockDelete *argp, CLIENT *clnt)
{
        static blockResponse clnt_res; &lt;&lt;&lt;&lt;&lt;&lt;-------- Same memory is used by everyone

        memset((char *)&amp;clnt_res, 0, sizeof(clnt_res)); &lt;&lt;&lt;&lt;&lt;---- Here memset is happening
        if (clnt_call (clnt, BLOCK_DELETE,
                (xdrproc_t) xdr_blockDelete, (caddr_t) argp,
                (xdrproc_t) xdr_blockResponse, (caddr_t) &amp;clnt_res,
                TIMEOUT) != RPC_SUCCESS) {
                return (NULL);
        }
        return (&amp;clnt_res); &lt;&lt;&lt;&lt;&lt;---- ptr to this memory is returned.
}

So while Thread-1 is returned "return (&amp;clnt_res);" another thread could be
doing "memset((char *)&amp;clnt_res, 0, sizeof(clnt_res));"

This seem to be a day-1 gluster-blockd bug from the looks of it.

Change-Id: I3fc76d7814c4fe5b286577586ec44d752dcc73f0
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>misc: fix warnings</title>
<updated>2017-08-29T17:30:13+00:00</updated>
<author>
<name>Prasanna Kumar Kalever</name>
<email>prasanna.kalever@redhat.com</email>
</author>
<published>2017-08-29T16:05:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/gluster-block.git/commit/?id=1a0e590851fcbf7e4d8299f619625c1d31754c03'/>
<id>1a0e590851fcbf7e4d8299f619625c1d31754c03</id>
<content type='text'>
Change-Id: I11274ad59925ec3d034baefc2cc2e307afa45479
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I11274ad59925ec3d034baefc2cc2e307afa45479
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gluster-block: parse remote command outputs</title>
<updated>2017-08-28T15:26:04+00:00</updated>
<author>
<name>Prasanna Kumar Kalever</name>
<email>prasanna.kalever@redhat.com</email>
</author>
<published>2017-08-22T11:18:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/gluster-block.git/commit/?id=64ba10f39774607b32e1f71b2852d4f34fde378f'/>
<id>64ba10f39774607b32e1f71b2852d4f34fde378f</id>
<content type='text'>
Change-Id: Ic2317843a8bd882fc26233373a4b4c35b13f24c6
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ic2317843a8bd882fc26233373a4b4c35b13f24c6
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gluster-block: use targetcli interactive mode</title>
<updated>2017-08-28T09:36:00+00:00</updated>
<author>
<name>Prasanna Kumar Kalever</name>
<email>prasanna.kalever@redhat.com</email>
</author>
<published>2017-08-16T06:48:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/gluster-block.git/commit/?id=1316624066cc1ff821f892ea6601a63ca2d0094a'/>
<id>1316624066cc1ff821f892ea6601a63ca2d0094a</id>
<content type='text'>
Currently, on each targetcli create call, rtslib will rebuild its bs_cache, so
as the /sys/kernel/config/target/core dir gets more entries this takes longer
and longer to scan. Hence using repetitive targetcli in the block create
for creating iqn, backend, setting acls, setting globals will induce too
much delay in block create. As the number of blocks on the node increases,
the delay will be too longer.

This does not happen if we open targetcli in interactive mode and just do
multiple create commands form it, since the bs_cache is build once.

Read More:
https://goo.gl/8aYT38

Change-Id: I2be78a748e013f253ce8f99746989a1cf735a56f
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, on each targetcli create call, rtslib will rebuild its bs_cache, so
as the /sys/kernel/config/target/core dir gets more entries this takes longer
and longer to scan. Hence using repetitive targetcli in the block create
for creating iqn, backend, setting acls, setting globals will induce too
much delay in block create. As the number of blocks on the node increases,
the delay will be too longer.

This does not happen if we open targetcli in interactive mode and just do
multiple create commands form it, since the bs_cache is build once.

Read More:
https://goo.gl/8aYT38

Change-Id: I2be78a748e013f253ce8f99746989a1cf735a56f
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>logger: support logdir choosing via Environment variable</title>
<updated>2017-08-17T08:52:55+00:00</updated>
<author>
<name>Prasanna Kumar Kalever</name>
<email>prasanna.kalever@redhat.com</email>
</author>
<published>2017-08-17T05:51:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/gluster-block.git/commit/?id=b535c44fdd2b71c50a8fcbcf1e1e1c2d1c0340e9'/>
<id>b535c44fdd2b71c50a8fcbcf1e1e1c2d1c0340e9</id>
<content type='text'>
Currently the default logdir is DATADIR /log/gluster-block/

This patch will provide a way to change this default logdir via Env variable
$ export GB_LOGDIR=/var/log/gluster-block-new-path/

Note: make sure to restart the processes (cli &amp; daemon) after you set GB_LOGDIR

Change-Id: Id142e4a4dfe7b6ebc9cf8296b8ceb8bff37691b8
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently the default logdir is DATADIR /log/gluster-block/

This patch will provide a way to change this default logdir via Env variable
$ export GB_LOGDIR=/var/log/gluster-block-new-path/

Note: make sure to restart the processes (cli &amp; daemon) after you set GB_LOGDIR

Change-Id: Id142e4a4dfe7b6ebc9cf8296b8ceb8bff37691b8
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gluster-block: support force delete option</title>
<updated>2017-08-08T10:14:32+00:00</updated>
<author>
<name>Prasanna Kumar Kalever</name>
<email>prasanna.kalever@redhat.com</email>
</author>
<published>2017-08-02T18:12:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/gluster-block.git/commit/?id=d723907c8eaa25f107c7fadd79ca5f9bc6596edf'/>
<id>d723907c8eaa25f107c7fadd79ca5f9bc6596edf</id>
<content type='text'>
$ gluster-block help
gluster-block (0.2.1)
usage:
  gluster-block &lt;command&gt; &lt;volname[/blockname]&gt; [&lt;args&gt;] [--json*]

commands:
[...]
  delete  &lt;volname/blockname&gt; [force]
        delete block device.
[...]

Change-Id: I64ac01ec148e2e1d4d0ba0d4c5560df9334d58f5
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
$ gluster-block help
gluster-block (0.2.1)
usage:
  gluster-block &lt;command&gt; &lt;volname[/blockname]&gt; [&lt;args&gt;] [--json*]

commands:
[...]
  delete  &lt;volname/blockname&gt; [force]
        delete block device.
[...]

Change-Id: I64ac01ec148e2e1d4d0ba0d4c5560df9334d58f5
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gluster-block: do not allow delete if any node is down</title>
<updated>2017-08-03T12:46:05+00:00</updated>
<author>
<name>Prasanna Kumar Kalever</name>
<email>prasanna.kalever@redhat.com</email>
</author>
<published>2017-08-01T18:24:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/gluster-block.git/commit/?id=44f732d877743c692abb5d389ccda941b1fa4959'/>
<id>44f732d877743c692abb5d389ccda941b1fa4959</id>
<content type='text'>
Change-Id: If729b80a8139add989170d3b590e92706128c37e
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: If729b80a8139add989170d3b590e92706128c37e
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>create: move saveconfig out of the loop</title>
<updated>2017-07-12T19:01:54+00:00</updated>
<author>
<name>Prasanna Kumar Kalever</name>
<email>prasanna.kalever@redhat.com</email>
</author>
<published>2017-07-12T18:31:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/gluster-block.git/commit/?id=c6295a4e56375e252a43f34d7d6fa8a804a9a732'/>
<id>c6295a4e56375e252a43f34d7d6fa8a804a9a732</id>
<content type='text'>
In the previous patch,

`commit f2e46779c0175e5063ce07256023f1977b333f2d
  Author: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
  Date:   Fri Jul 7 15:51:38 2017 +0530

  tcmu: backstore attribute set cmd_time_out=0
  [...]`

unintentionally saveconfig was left inside the loop. Hence fixing this by
pushing it outside.

Problem:
Currently, while populating 'exec' variable the following line after saveconfig
i.e. at line GB_FREE(tmp); the 'tmp' variable is made NULL; Hence in each
loop, condition if(!tmp) is always true, and the 'else' set of statements will
never be executed.

Impact:
On block create with HA &gt; 1, only for Nth(last) node portal gets created for
rest of the nodes portal and their attr will never be created/set. As a
result block is not exported correctly.

Also, remove duplicated DEVNULLPATH redirection with attr setting

Change-Id: I1f77461de6b89af4e4af098e0444ea3526669030
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the previous patch,

`commit f2e46779c0175e5063ce07256023f1977b333f2d
  Author: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
  Date:   Fri Jul 7 15:51:38 2017 +0530

  tcmu: backstore attribute set cmd_time_out=0
  [...]`

unintentionally saveconfig was left inside the loop. Hence fixing this by
pushing it outside.

Problem:
Currently, while populating 'exec' variable the following line after saveconfig
i.e. at line GB_FREE(tmp); the 'tmp' variable is made NULL; Hence in each
loop, condition if(!tmp) is always true, and the 'else' set of statements will
never be executed.

Impact:
On block create with HA &gt; 1, only for Nth(last) node portal gets created for
rest of the nodes portal and their attr will never be created/set. As a
result block is not exported correctly.

Also, remove duplicated DEVNULLPATH redirection with attr setting

Change-Id: I1f77461de6b89af4e4af098e0444ea3526669030
Signed-off-by: Prasanna Kumar Kalever &lt;prasanna.kalever@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
