mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
ctdb-pmda: Use 1s timeout for fetching statistics
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12138 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 499bfce3e9138e01216170a25b12b404d7430a74)
This commit is contained in:
parent
2b203f1989
commit
8754d07975
@ -441,7 +441,6 @@ static int
|
|||||||
pmda_ctdb_fetch(int numpmid, pmID pmidlist[], pmResult **resp, pmdaExt *pmda)
|
pmda_ctdb_fetch(int numpmid, pmID pmidlist[], pmResult **resp, pmdaExt *pmda)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct timeval ctdb_timeout;
|
|
||||||
|
|
||||||
if (client == NULL) {
|
if (client == NULL) {
|
||||||
fprintf(stderr, "attempting reconnect to ctdbd\n");
|
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,
|
ret = ctdb_ctrl_statistics(client, ev, client, CTDB_CURRENT_NODE,
|
||||||
ctdb_timeout, &stats);
|
tevent_timeval_current_ofs(1,0), &stats);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
fprintf(stderr, "ctdb control for statistics failed, reconnecting\n");
|
fprintf(stderr, "ctdb control for statistics failed, reconnecting\n");
|
||||||
pmda_ctdb_daemon_disconnect();
|
pmda_ctdb_daemon_disconnect();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user