1
0
mirror of https://github.com/gluster/gluster-block.git synced 2026-02-05 12:45:33 +01:00
Files
gluster-block/cli
Prasanna Kumar Kalever 61e6fa82f4 cli-timeout: make rpc-timeout as configurable option
There are two rpc calls involved in the design,
Channel A: From cli process to local daemon (cli thread)
Channel B: From local daemon (cli thread) to remote daemon (remote thread)

Timeout for channel A is configurable now, using
/etc/sysconfig/gluster-blockd, by adjusting option 'GB_CLI_TIMEOUT' (in seconds)

$ cat /etc/sysconfig/gluster-blockd
GB_CLI_TIMEOUT=900

Changes to this value takes effect every time we start running/triggering new
cli command/request.

At the moment making Timeout configurable for channel B is not important, it is
hardcoded as 300 seconds in the code for now.

Some more details:
-----------------
It would have been an easy fix calling clnt_control() right after clnt_create(),
unfortunately there is a bug in glibc, which is why we had to hack the rpc
generated code instead of directly calling clnt_control(), see my very old
commit [1] which explains why we had to override (in a hacky-way) the default
generated TIMEOUT.

[1] 1dbbd7d457

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Reviewed & Tested-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2019-01-29 19:39:06 +05:30
..