diff options
author | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-05-05 15:11:24 +0530 |
---|---|---|
committer | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2017-05-05 16:09:30 +0530 |
commit | 1dbbd7d457251afd1f005bf262b5c366642535e2 (patch) | |
tree | 232fbe0301bccbe8a8d42fd6589b24403319fe00 /README.md | |
parent | a31ee2d59d59c74e2a1b91dc40cd12b7c918a45c (diff) |
cli: increase the clnt_call() total time out.
The connect() in daemon takes too long to return for invalid IP addresses,
the delay is much higher that the CLI RPC Timeout, hence the CLI returns
before the daemon returns. Hence SIGPIPE is issued.
The issue can be fixed by increasing the CLI RPC clnt_call() TIMEOUT.
This should actually be handled like:
struct timeval tv;
CLIENT *cl;
cl=clnt_create("somehost", SOMEPROG, SOMEVERS, "tcp");
if (cl=NULL) {
exit(1);
}
tv.tv_sec=60; /* change timeout to 1 minute */
tv.tv_usec=0;
clnt_control(cl, CLSET_TIMEOUT, &tv);
But currently there is a bug in sun RPC which ignores TIMEOUT set using
cln_control. See [1]
Hence using regex to override default TIMEOUT generated in rpc code.
[1] https://lists.gnu.org/archive/html/bug-glibc/2000-10/msg00095.html
Change-Id: I75eceea6b9f362f8bf8c2fcb687155635efc65d7
Fixes: #15
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions