summaryrefslogtreecommitdiffstats
path: root/utils/gssd/gssd.c
diff options
context:
space:
mode:
authorRinku Kothiya <rkothiya@redhat.com>2014-07-25 10:50:55 -0400
committerSteve Dickson <steved@redhat.com>2014-07-25 10:58:53 -0400
commitb7b9e4e69587652b40d543094b133fb8b4881dc1 (patch)
tree39e1e2180e34009cc62f089bd26d35cc6be0c8f2 /utils/gssd/gssd.c
parent404c79c81df0548d50216cddc7d2c4ebfca45c45 (diff)
downloadnfs-utils-b7b9e4e69587652b40d543094b133fb8b4881dc1.tar.gz
nfs-utils-b7b9e4e69587652b40d543094b133fb8b4881dc1.tar.xz
nfs-utils-b7b9e4e69587652b40d543094b133fb8b4881dc1.zip
gssd: configurable connection timeout for the rpcgssd service
When using rpc.gssd to secure NFSv3 FS using krb5, the following errors can happen as a result of network congestion. "rpc.gssd WARNING: can't create tcp rpc_clnt to server ... : RPC: Remote system error - Connection timed out" we had a successful reproducer of the problem which we tested using this patch by starting rpc.gssd with "-T 60" as the option which solved the problem. reproducer steps were to throttle the network using tc command and then in a never ending loop mount the share, then write some data in the file on the share and unmount it. keep a delay of 5 sec between the iteration of each loop. CC: Christian Horn <chorn@redhat.com> Signed-off-by: Rinku Kothiya <rkothiya@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/gssd/gssd.c')
-rw-r--r--utils/gssd/gssd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c
index 611ef1a..6b8b863 100644
--- a/utils/gssd/gssd.c
+++ b/utils/gssd/gssd.c
@@ -64,6 +64,7 @@ char *ccachesearch[GSSD_MAX_CCACHE_SEARCH + 1];
int use_memcache = 0;
int root_uses_machine_creds = 1;
unsigned int context_timeout = 0;
+unsigned int rpc_timeout = 5;
char *preferred_realm = NULL;
int pipefds[2] = { -1, -1 };
@@ -105,7 +106,7 @@ main(int argc, char *argv[])
char *progname;
memset(ccachesearch, 0, sizeof(ccachesearch));
- while ((opt = getopt(argc, argv, "DfvrlmnMp:k:d:t:R:")) != -1) {
+ while ((opt = getopt(argc, argv, "DfvrlmnMp:k:d:t:T:R:")) != -1) {
switch (opt) {
case 'f':
fg = 1;
@@ -143,6 +144,9 @@ main(int argc, char *argv[])
case 't':
context_timeout = atoi(optarg);
break;
+ case 'T':
+ rpc_timeout = atoi(optarg);
+ break;
case 'R':
preferred_realm = strdup(optarg);
break;