Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 51049be41e3c3f198f7b39173bddb2d31786bc5b
Parent: 6e91a44cfb2d6baa1a639a2f6e6023bf82ab3cb7
Author: Eduardo Damato <edamato(a)redhat.com>
AuthorDate: Tue Sep 29 10:03:09 2009 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Tue Sep 29 10:08:20 2009 -0400
qdisk: Disable max_error_cycles when using io_timeout
Signed-off-by: Eduardo Damato <edamato(a)redhat.com>
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
cman/man/qdisk.5 | 5 +++--
cman/qdisk/main.c | 5 ++++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/cman/man/qdisk.5 b/cman/man/qdisk.5
index b28390e..7a00a25 100644
--- a/cman/man/qdisk.5
+++ b/cman/man/qdisk.5
@@ -298,7 +298,8 @@ while qdiskd is running.
.in 12
If set to 1 (on), qdiskd will watch internal timers and reboot the node
if qdisk is not able to write to disk after (interval * tko) seconds.
-The default for this value is 0 (off).
+The default for this value is 0 (off). If io_timeout is active
+max_error_cycles is overridden and set to off.
.in 9
\fIscheduler\fP\fB="\fPrr\fB"\fP
@@ -366,7 +367,7 @@ If we receive an I/O error during a cycle, we do not poll CMAN and
tell
it we are alive. If specified, this value will cause qdiskd to exit
after the specified number of consecutive cycles during which I/O errors
occur. The default is 0 (no maximum). This option can be changed while
-qdiskd is running.
+qdiskd is running. This option is ignored if io_timeout is set to 1.
.in 8
\fB/>\fP
diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index e4bcb60..8016295 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -1431,12 +1431,15 @@ get_dynamic_config_data(qd_ctx *ctx, int ccsfd)
/*
* How many consecutive error cycles do we allow before
* giving up?
+ *
+ * Notice that max_error_cycles is disabled if io_timeout is
+ * active.
*/
/* default = no max */
snprintf(query, sizeof(query), "/cluster/quorumd/@max_error_cycles");
if (ccs_get(ccsfd, query, &val) == 0) {
ctx->qc_max_error_cycles = atoi(val);
- if (ctx->qc_max_error_cycles <= 0)
+ if ((ctx->qc_max_error_cycles <= 0) || (ctx->qc_flags & RF_IOTIMEOUT))
ctx->qc_max_error_cycles = 0;
free(val);
}