From e87a8b6a671924598c01d69b47b8001ca4ecc37f Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Tue, 2 Aug 2016 19:06:10 +1000 Subject: [PATCH] ctdb-pmda: Use 1s timeout for fetching statistics BUG: https://bugzilla.samba.org/show_bug.cgi?id=12138 Signed-off-by: Amitay Isaacs Reviewed-by: Jeremy Allison (cherry picked from commit 499bfce3e9138e01216170a25b12b404d7430a74) --- ctdb/utils/pmda/pmda_ctdb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ctdb/utils/pmda/pmda_ctdb.c b/ctdb/utils/pmda/pmda_ctdb.c index 6131be9..a77f26c 100644 --- a/ctdb/utils/pmda/pmda_ctdb.c +++ b/ctdb/utils/pmda/pmda_ctdb.c @@ -441,7 +441,6 @@ static int pmda_ctdb_fetch(int numpmid, pmID pmidlist[], pmResult **resp, pmdaExt *pmda) { int ret; - struct timeval ctdb_timeout; if (client == NULL) { fprintf(stderr, "attempting reconnect to ctdbd\n"); @@ -453,7 +452,7 @@ pmda_ctdb_fetch(int numpmid, pmID pmidlist[], pmResult **resp, pmdaExt *pmda) } ret = ctdb_ctrl_statistics(client, ev, client, CTDB_CURRENT_NODE, - ctdb_timeout, &stats); + tevent_timeval_current_ofs(1,0), &stats); if (ret != 0) { fprintf(stderr, "ctdb control for statistics failed, reconnecting\n"); pmda_ctdb_daemon_disconnect(); -- 2.7.4