Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=9ca5b914…
Commit: 9ca5b9143900968bab55104a41b8074758a62181
Parent: 0000000000000000000000000000000000000000
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: 2012-07-27 06:50 +0000
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: 2012-07-27 06:50 +0000
annotated tag: v3.1.9 has been created
at 9ca5b9143900968bab55104a41b8074758a62181 (tag)
tagging cd73f094f7c163aca57a1dc9d5138fb468846835 (commit)
replaces v3.1.8
v3.1.9 release
Fabio M. Di Nitto (2):
test commit
build: fix dist_man_* vs man_*
Lon Hohberger (1):
Add iPDU fencing agent for model 46M4002
Marek 'marx' Grac (8):
fence_brocade: support option action on STDIN, originally only operation was supported
fence agents: Fix unique attribute for agents which are not based on fencing library
fence agents: autodetect of EOL in fence agents
fence_hpblade: Fence agent for HP BladeSystem
fence agents: Some agents do not support action=metadata on STDIN
fence_ipdu: Minor fixes to fence agent
Add fence agents specific for HP iLO2, iLO3, IMM and iDrac
fence_ilo2 was not correctly cleaned by Makefile
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=4b893d2a9f46d…
Commit: 4b893d2a9f46d643859fa50856ac63e0cdbd4a02
Parent: 982f2aa377fd1c0471b714945c401fdfe86e9bc1
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Mon Jul 9 08:33:37 2012 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Fri Jul 27 08:47:10 2012 +0200
qdiskd: restrict master_wins to 2 node cluster
given enough mingling of cluster.conf it was possible to
break quorum rule #1: there is only one quorum in a cluster at
any given time.
this change restricts master_wins to 2 node cluster only
and provides extra feedback to the user (via logging) on why
the mode is disabled.
Resolves: rhbz#838047
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Reviewed-by: Lon Hohberger <lhh(a)redhat.com>
---
cman/man/qdisk.5 | 5 +++--
cman/qdisk/disk.h | 1 +
cman/qdisk/main.c | 22 +++++++++++++++-------
3 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/cman/man/qdisk.5 b/cman/man/qdisk.5
index ca974fa..938ed69 100644
--- a/cman/man/qdisk.5
+++ b/cman/man/qdisk.5
@@ -297,8 +297,9 @@ and qdiskd's timeout (interval*tko) should be less than half of
Totem's token timeout. See section 3.3.1 for more information.
This option only takes effect if there are no heuristics
-configured. Usage of this option in configurations with more than
-two cluster nodes is undefined and should not be done.
+configured and it is valid only for 2 node cluster.
+This option is automatically disabled if heuristics are
+defined or cluster has more than 2 nodes configured.
In a two-node cluster with no heuristics and no defined vote
count (see above), this mode is turned by default. If enabled in
diff --git a/cman/qdisk/disk.h b/cman/qdisk/disk.h
index 6bed41d..1d8f7c8 100644
--- a/cman/qdisk/disk.h
+++ b/cman/qdisk/disk.h
@@ -252,6 +252,7 @@ typedef struct {
int qc_master; /* Master?! */
int qc_config;
int qc_token_timeout;
+ int qc_auto_votes;
disk_node_state_t qc_disk_status;
disk_node_state_t qc_status;
run_flag_t qc_flags;
diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index 594e9e8..47ef5d2 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -1495,7 +1495,7 @@ auto_qdisk_votes(int desc)
logt_print(LOG_ERR, "Unable to determine qdiskd votes "
"automatically\n");
else
- logt_print(LOG_DEBUG, "Setting votes to %d\n", ret);
+ logt_print(LOG_DEBUG, "Setting autocalculated votes to %d\n", ret);
return (ret);
}
@@ -1657,6 +1657,8 @@ get_dynamic_config_data(qd_ctx *ctx, int ccsfd)
ctx->qc_flags &= ~RF_AUTO_VOTES;
}
+ ctx->qc_auto_votes = auto_qdisk_votes(ccsfd);
+
snprintf(query, sizeof(query), "/cluster/quorumd/@votes");
if (ccs_get(ccsfd, query, &val) == 0) {
ctx->qc_votes = atoi(val);
@@ -1664,7 +1666,7 @@ get_dynamic_config_data(qd_ctx *ctx, int ccsfd)
if (ctx->qc_votes < 0)
ctx->qc_votes = 0;
} else {
- ctx->qc_votes = auto_qdisk_votes(ccsfd);
+ ctx->qc_votes = ctx->qc_auto_votes;
if (ctx->qc_votes < 0) {
if (ctx->qc_config) {
logt_print(LOG_WARNING, "Unable to determine "
@@ -1930,15 +1932,21 @@ get_config_data(qd_ctx *ctx, struct h_data *h, int maxh, int *cfh)
*cfh = configure_heuristics(ccsfd, h, maxh,
ctx->qc_interval * (ctx->qc_tko - 1));
- if (*cfh) {
- if (ctx->qc_flags & RF_MASTER_WINS) {
- logt_print(LOG_WARNING, "Master-wins mode disabled\n");
+ if (ctx->qc_flags & RF_MASTER_WINS) {
+ if (*cfh) {
+ logt_print(LOG_WARNING, "Master-wins mode disabled "
+ "(not compatible with heuristics)\n");
+ ctx->qc_flags &= ~RF_MASTER_WINS;
+ }
+ if (ctx->qc_auto_votes != 1) {
+ logt_print(LOG_WARNING, "Master-wins mode disabled "
+ "(not compatible with more than 2 nodes)\n");
ctx->qc_flags &= ~RF_MASTER_WINS;
}
} else {
if (ctx->qc_flags & RF_AUTO_VOTES &&
- !(ctx->qc_flags & RF_MASTER_WINS) &&
- ctx->qc_votes == 1) {
+ !*cfh &&
+ ctx->qc_auto_votes == 1) {
/* Two node cluster, no heuristics, 1 vote for
* quorum disk daemon. Safe to enable master-wins.
* In fact, qdiskd without master-wins in this config
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=ebac037f4fa11…
Commit: ebac037f4fa11de5f803c6025c5b182c962e84d1
Parent: c65a13a82189f38bd80d5c52924d09a7d98daa37
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Mon Jul 9 08:33:37 2012 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Fri Jul 27 08:45:37 2012 +0200
qdiskd: restrict master_wins to 2 node cluster
given enough mingling of cluster.conf it was possible to
break quorum rule #1: there is only one quorum in a cluster at
any given time.
this change restricts master_wins to 2 node cluster only
and provides extra feedback to the user (via logging) on why
the mode is disabled.
Resolves: rhbz#838047
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Reviewed-by: Lon Hohberger <lhh(a)redhat.com>
---
cman/man/qdisk.5 | 5 +++--
cman/qdisk/disk.h | 1 +
cman/qdisk/main.c | 22 +++++++++++++++-------
3 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/cman/man/qdisk.5 b/cman/man/qdisk.5
index ca974fa..938ed69 100644
--- a/cman/man/qdisk.5
+++ b/cman/man/qdisk.5
@@ -297,8 +297,9 @@ and qdiskd's timeout (interval*tko) should be less than half of
Totem's token timeout. See section 3.3.1 for more information.
This option only takes effect if there are no heuristics
-configured. Usage of this option in configurations with more than
-two cluster nodes is undefined and should not be done.
+configured and it is valid only for 2 node cluster.
+This option is automatically disabled if heuristics are
+defined or cluster has more than 2 nodes configured.
In a two-node cluster with no heuristics and no defined vote
count (see above), this mode is turned by default. If enabled in
diff --git a/cman/qdisk/disk.h b/cman/qdisk/disk.h
index 6bed41d..1d8f7c8 100644
--- a/cman/qdisk/disk.h
+++ b/cman/qdisk/disk.h
@@ -252,6 +252,7 @@ typedef struct {
int qc_master; /* Master?! */
int qc_config;
int qc_token_timeout;
+ int qc_auto_votes;
disk_node_state_t qc_disk_status;
disk_node_state_t qc_status;
run_flag_t qc_flags;
diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index 16c26e4..8eb9a3a 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -1505,7 +1505,7 @@ auto_qdisk_votes(int desc)
logt_print(LOG_ERR, "Unable to determine qdiskd votes "
"automatically\n");
else
- logt_print(LOG_DEBUG, "Setting votes to %d\n", ret);
+ logt_print(LOG_DEBUG, "Setting autocalculated votes to %d\n", ret);
return (ret);
}
@@ -1667,6 +1667,8 @@ get_dynamic_config_data(qd_ctx *ctx, int ccsfd)
ctx->qc_flags &= ~RF_AUTO_VOTES;
}
+ ctx->qc_auto_votes = auto_qdisk_votes(ccsfd);
+
snprintf(query, sizeof(query), "/cluster/quorumd/@votes");
if (ccs_get(ccsfd, query, &val) == 0) {
ctx->qc_votes = atoi(val);
@@ -1674,7 +1676,7 @@ get_dynamic_config_data(qd_ctx *ctx, int ccsfd)
if (ctx->qc_votes < 0)
ctx->qc_votes = 0;
} else {
- ctx->qc_votes = auto_qdisk_votes(ccsfd);
+ ctx->qc_votes = ctx->qc_auto_votes;
if (ctx->qc_votes < 0) {
if (ctx->qc_config) {
logt_print(LOG_WARNING, "Unable to determine "
@@ -1940,15 +1942,21 @@ get_config_data(qd_ctx *ctx, struct h_data *h, int maxh, int *cfh)
*cfh = configure_heuristics(ccsfd, h, maxh,
ctx->qc_interval * (ctx->qc_tko - 1));
- if (*cfh) {
- if (ctx->qc_flags & RF_MASTER_WINS) {
- logt_print(LOG_WARNING, "Master-wins mode disabled\n");
+ if (ctx->qc_flags & RF_MASTER_WINS) {
+ if (*cfh) {
+ logt_print(LOG_WARNING, "Master-wins mode disabled "
+ "(not compatible with heuristics)\n");
+ ctx->qc_flags &= ~RF_MASTER_WINS;
+ }
+ if (ctx->qc_auto_votes != 1) {
+ logt_print(LOG_WARNING, "Master-wins mode disabled "
+ "(not compatible with more than 2 nodes)\n");
ctx->qc_flags &= ~RF_MASTER_WINS;
}
} else {
if (ctx->qc_flags & RF_AUTO_VOTES &&
- !(ctx->qc_flags & RF_MASTER_WINS) &&
- ctx->qc_votes == 1) {
+ !*cfh &&
+ ctx->qc_auto_votes == 1) {
/* Two node cluster, no heuristics, 1 vote for
* quorum disk daemon. Safe to enable master-wins.
* In fact, qdiskd without master-wins in this config