Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 8742ae97a69c8cc282faf39d8c1e7bfda441e5b2
Parent: fe9a89972834d0459c312bede9e4a32df52e445a
Author: Eduardo Damato <edamato(a)redhat.com>
AuthorDate: Tue Sep 29 10:03:09 2009 -0400
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Fri Oct 30 16:31:08 2009 -0400
qdisk: Disable max_error_cycles when using io_timeout
Resolves: rgbz#511113
Part 2/4
Signed-off-by: Eduardo Damato <edamato(a)redhat.com>
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
---
cman/man/qdisk.5 | 6 ++++--
cman/qdisk/main.c | 5 ++++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/cman/man/qdisk.5 b/cman/man/qdisk.5
index 513d56b..7d28f90 100644
--- a/cman/man/qdisk.5
+++ b/cman/man/qdisk.5
@@ -295,7 +295,8 @@ pass. The default for this value is 0 (off).
.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
@@ -360,7 +361,8 @@ device name.
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).
+occur. The default is 0 (no maximum). 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 c86759e..b698f2c 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -1425,12 +1425,15 @@ get_config_data(char *cluster_name, qd_ctx *ctx, struct h_data *h,
int maxh,
/*
* 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);
}