cluster: RHEL59 - rgmanager: Exit uncleanly only when CMAN_SHUTDOWN_ANYWAY is set
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=0c5ff64499b...
Commit: 0c5ff64499bbb510a83afab6a7180185e08060f9
Parent: 01d917b0f2bb773ae62c2eb320e9877647803b70
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Fri Jul 27 13:03:04 2012 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Fri Jul 27 15:54:51 2012 -0400
rgmanager: Exit uncleanly only when CMAN_SHUTDOWN_ANYWAY is set
Only exit uncleanly when the CMAN_SHUTDOWN_ANYWAY flag is set in the
argument passed when handling the CMAN_REASON_TRY_SHUTDOWN event.
This fixes the case where args is 2, where we want to refuse to
shut down.
Resolves: rhbz#769730
Acked-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/clulib/msg_cluster.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/rgmanager/src/clulib/msg_cluster.c b/rgmanager/src/clulib/msg_cluster.c
index e864853..e4b6b39 100644
--- a/rgmanager/src/clulib/msg_cluster.c
+++ b/rgmanager/src/clulib/msg_cluster.c
@@ -211,7 +211,7 @@ poll_cluster_messages(int timeout)
if (cman_dispatch(ch, 0) < 0) {
process_cman_event(ch, NULL,
- CMAN_REASON_TRY_SHUTDOWN, 1);
+ CMAN_REASON_TRY_SHUTDOWN, CMAN_SHUTDOWN_ANYWAY);
}
ret = 0;
}
@@ -987,7 +987,9 @@ process_cman_event(cman_handle_t handle, void *private, int reason, int arg)
printf("EVENT: %p %p %d %d\n", handle, private, reason, arg);
#endif
- if (reason == CMAN_REASON_TRY_SHUTDOWN && !arg) {
+ if (reason == CMAN_REASON_TRY_SHUTDOWN &&
+ !(arg & CMAN_SHUTDOWN_ANYWAY))
+ {
cman_replyto_shutdown(handle, 0);
return;
}
11 years, 8 months
cluster: RHEL59 - fence_scsi: fix typos in debug messages
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=01d917b0f2b...
Commit: 01d917b0f2bb773ae62c2eb320e9877647803b70
Parent: 0a588f475afdb78660b424587f2c6460d4f1be82
Author: Ryan O'Hara <rohara(a)redhat.com>
AuthorDate: Tue Apr 17 18:40:31 2012 -0500
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Fri Jul 27 09:35:25 2012 +0200
fence_scsi: fix typos in debug messages
Resolves: rhbz#674497
Signed-off-by: Ryan O'Hara <rohara(a)redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
fence/agents/scsi/fence_scsi.pl | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
index 91f113d..84cee91 100755
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -111,7 +111,7 @@ sub get_node_id
sub get_node_name
{
- print "[$pname]: get_hode_name = $opt_n\n" if $opt_v;
+ print "[$pname]: get_node_name = $opt_n\n" if $opt_v;
return $opt_n;
}
@@ -163,7 +163,7 @@ sub get_host_name
}
}
- print "[$pname]: get_host_nam = $host_name\n" if $opt_v;
+ print "[$pname]: get_host_name = $host_name\n" if $opt_v;
return $host_name;
}
11 years, 8 months
fence-agents: the annotated tag v3.1.9 has been created
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=9ca5b9...
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
11 years, 8 months
cluster: RHEL6 - qdiskd: restrict master_wins to 2 node cluster
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=4b893d2a9f4...
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
11 years, 8 months
cluster: STABLE32 - qdiskd: restrict master_wins to 2 node cluster
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=ebac037f4fa...
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
11 years, 8 months
fence-agents: master - fence_ilo2 was not correctly cleaned by Makefile
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=cd73f0...
Commit: cd73f094f7c163aca57a1dc9d5138fb468846835
Parent: 87266bcbf3f1b71664e65d82fb6de9f8814cb19e
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Thu Jul 26 14:35:44 2012 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Thu Jul 26 14:35:44 2012 +0200
fence_ilo2 was not correctly cleaned by Makefile
Related: rhbz#800650
---
fence/agents/ilo/Makefile.am | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fence/agents/ilo/Makefile.am b/fence/agents/ilo/Makefile.am
index 120727a..8df9a39 100644
--- a/fence/agents/ilo/Makefile.am
+++ b/fence/agents/ilo/Makefile.am
@@ -20,4 +20,4 @@ include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
clean-local: clean-man
- rm -f $(TARGET)
+ rm -f $(TARGET) $(SYMTARGET)
11 years, 8 months
fence-agents: master - Add fence agents specific for HP iLO2, iLO3, IMM and iDrac
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=87266b...
Commit: 87266bcbf3f1b71664e65d82fb6de9f8814cb19e
Parent: dff6b12ab73c8c38fc579ec312f398d6711cfeb8
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Thu Jul 26 14:27:14 2012 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Thu Jul 26 14:27:14 2012 +0200
Add fence agents specific for HP iLO2, iLO3, IMM and iDrac
These fence agents runs 'standard' fence agent (fence_ilo, fence_ipmilan) with correct timeout options, encryption, snmp_version, ... Originally they were supposed to be symbolic links but this approach is not recommended so they regular files.
Resolves: rhbz#800650
---
fence/agents/ilo/Makefile.am | 10 ++++++++--
fence/agents/ilo/fence_ilo.py | 1 +
fence/agents/ipmilan/Makefile.am | 11 +++++++++--
fence/agents/ipmilan/ipmilan.c | 10 ++++++++++
fence/agents/lib/fence2man.xsl | 4 ++++
fence/agents/lib/fencing.py.py | 3 +++
6 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/fence/agents/ilo/Makefile.am b/fence/agents/ilo/Makefile.am
index 7b44f59..120727a 100644
--- a/fence/agents/ilo/Makefile.am
+++ b/fence/agents/ilo/Makefile.am
@@ -2,13 +2,19 @@ MAINTAINERCLEANFILES = Makefile.in
TARGET = fence_ilo
+SYMTARGET = fence_ilo2
+
SRC = $(TARGET).py
EXTRA_DIST = $(SRC)
-sbin_SCRIPTS = $(TARGET)
+sbin_SCRIPTS = $(TARGET) $(SYMTARGET)
+
+man_MANS = $(TARGET).8 $(SYMTARGET).8
+
+$(SYMTARGET): $(TARGET)
+ cp $^ $@
-man_MANS = $(TARGET).8
include $(top_srcdir)/make/fencebuild.mk
include $(top_srcdir)/make/fenceman.mk
diff --git a/fence/agents/ilo/fence_ilo.py b/fence/agents/ilo/fence_ilo.py
index f70dc9c..d4e34df 100644
--- a/fence/agents/ilo/fence_ilo.py
+++ b/fence/agents/ilo/fence_ilo.py
@@ -82,6 +82,7 @@ The agent opens an SSL connection to the iLO card. Once the SSL \
connection is established, the agent is able to communicate with \
the iLO card through an XML stream."
docs["vendorurl"] = "http://www.hp.com"
+ docs["symlink"] = [("fence_ilo2", "Fence agent for HP iLO2")]
show_docs(options, docs)
##
diff --git a/fence/agents/ipmilan/Makefile.am b/fence/agents/ipmilan/Makefile.am
index 17ac8f2..c4fc636 100644
--- a/fence/agents/ipmilan/Makefile.am
+++ b/fence/agents/ipmilan/Makefile.am
@@ -2,15 +2,22 @@ MAINTAINERCLEANFILES = Makefile.in
TARGET = fence_ipmilan
+SYMTARGET = fence_ilo3 fence_imm fence_idrac
+
sbin_PROGRAMS = $(TARGET)
+sbin_SCRIPTS = $(SYMTARGET)
+
noinst_HEADERS = expect.h
fence_ipmilan_SOURCES = expect.c ipmilan.c
-man_MANS = $(TARGET).8
+man_MANS = $(TARGET).8 $(SYMTARGET:%=%.8)
+
+$(SYMTARGET): $(TARGET)
+ cp $^ $@
include $(top_srcdir)/make/fencemanc.mk
clean-local: clean-man
- rm -f $(TARGET)
+ rm -f $(TARGET) $(SYMTARGET)
diff --git a/fence/agents/ipmilan/ipmilan.c b/fence/agents/ipmilan/ipmilan.c
index ef2b582..d1a0530 100644
--- a/fence/agents/ipmilan/ipmilan.c
+++ b/fence/agents/ipmilan/ipmilan.c
@@ -903,6 +903,9 @@ static void print_xml_metadata(char *pname) {
printf("%s\n","<?xml version=\"1.0\" ?>");
printf("%s%s%s\n","<resource-agent name=\"",pname,"\" shortdesc=\"Fence agent for IPMI over LAN\">");
+ printf("<symlink name=\"fence_ilo3\" shortdesc=\"Fence agent for HP iLO2\"/>\n");
+ printf("<symlink name=\"fence_idrac\" shortdesc=\"Fence agent for Dell iDRAC\"/>\n");
+ printf("<symlink name=\"fence_imm\" shortdesc=\"Fence agent for IBM Integrated Management Module\"/>\n");
printf("<longdesc>\n");
printf("fence_ipmilan is an I/O Fencing agent which can be used with "
"machines controlled by IPMI. This agent calls support software "
@@ -967,6 +970,7 @@ main(int argc, char **argv)
int cipher=-1;
int print_final_status=1;
int translated_ret = -1;
+ char *filename;
memset(ip, 0, sizeof(ip));
memset(authtype, 0, sizeof(authtype));
@@ -977,6 +981,12 @@ main(int argc, char **argv)
memset(method, 0, sizeof(method));
memset(delay, 0, sizeof(delay));
+ if (!strcmp(pname, "fence_ilo3")) {
+ lanplus = 1;
+ down_sleep = 4;
+ strncpy(method, "cycle\0", 6);
+ }
+
if (argc > 1) {
/*
Parse command line options if any were specified
diff --git a/fence/agents/lib/fence2man.xsl b/fence/agents/lib/fence2man.xsl
index 0fd71be..89baf7f 100644
--- a/fence/agents/lib/fence2man.xsl
+++ b/fence/agents/lib/fence2man.xsl
@@ -33,6 +33,10 @@
.TH FENCE_AGENT 8 2009-10-20 "<xsl:value-of select="@name"/> (Fence Agent)"
.SH NAME
<xsl:value-of select="@name" /> - <xsl:value-of select="@shortdesc" />
+<xsl:for-each select="symlink">
+.P
+<xsl:value-of select="@name" /> - <xsl:value-of select="@shortdesc" /> (symlink)
+</xsl:for-each>
.SH DESCRIPTION
.P
<xsl:value-of select="longdesc"/>
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index a9c287a..cb8ec26 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -471,6 +471,9 @@ def metadata(avail_opt, options, docs):
print "<?xml version=\"1.0\" ?>"
print "<resource-agent name=\"" + os.path.basename(sys.argv[0]) + "\" shortdesc=\"" + docs["shortdesc"] + "\" >"
+ if "symlink" in docs:
+ for (symlink,desc) in docs["symlink"]:
+ print "<symlink name=\"" + symlink + "\" shortdesc=\"" + desc + "\"/>"
print "<longdesc>" + docs["longdesc"] + "</longdesc>"
if docs.has_key("vendorurl"):
print "<vendor-url>" + docs["vendorurl"] + "</vendor-url>"
11 years, 8 months
cluster: RHEL6 - cman init: allow dlm hash table sizes to be tunable at startup
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=982f2aa377f...
Commit: 982f2aa377fd1c0471b714945c401fdfe86e9bc1
Parent: 88e4349b9b636d12b3c51f9c0f734b0259b36954
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Wed Jul 25 07:21:19 2012 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Thu Jul 26 13:23:05 2012 +0200
cman init: allow dlm hash table sizes to be tunable at startup
Resolves: rhbz#842370
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Acked-by: David Teigland <teigland(a)redhat.com>
---
cman/init.d/cman.in | 28 ++++++++++++++++++++++++++++
cman/init.d/cman.init.defaults.in | 7 +++++++
2 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 9a0d726..9de349d 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -110,6 +110,13 @@ fi
# DLM_CONTROLD_OPTS -- allow extra options to be passed to dlm_controld daemon.
[ -z "$DLM_CONTROLD_OPTS" ] && DLM_CONTROLD_OPTS=""
+# DLM_LKBTBL_SIZE - DLM_RSBTBL_SIZE - DLM_DIRTBL_SIZE
+# Allow tuning of DLM kernel hash table sizes.
+# do NOT change unless instructed to do so.
+[ -z "$DLM_LKBTBL_SIZE" ] && DLM_LKBTBL_SIZE=""
+[ -z "$DLM_RSBTBL_SIZE" ] && DLM_RSBTBL_SIZE=""
+[ -z "$DLM_DIRTBL_SIZE" ] && DLM_DIRTBL_SIZE=""
+
# FENCE_JOIN_TIMEOUT -- seconds to wait for fence domain join to
# complete. If the join hasn't completed in this time, fence_tool join
# exits with an error, and this script exits with an error. To wait
@@ -706,6 +713,23 @@ leave_fence_domain()
fi
}
+tune_dlm_hash_sizes()
+{
+ dlmdir="/sys/kernel/config/dlm/cluster"
+
+ [ -n "$DLM_LKBTBL_SIZE" ] && [ -f $dlmdir/lkbtbl_size ] && \
+ echo $DLM_LKBTBL_SIZE > $dlmdir/lkbtbl_size
+
+ [ -n "$DLM_RSBTBL_SIZE" ] && [ -f $dlmdir/rsbtbl_size ] && \
+ echo $DLM_RSBTBL_SIZE > $dlmdir/rsbtbl_size
+
+ [ -n "$DLM_DIRTBL_SIZE" ] && [ -f $dlmdir/dirtbl_size ] && \
+ echo $DLM_DIRTBL_SIZE > $dlmdir/dirtbl_size
+
+ return 0
+}
+
+
start()
{
currentaction="start"
@@ -773,6 +797,10 @@ start()
none \
"Starting dlm_controld"
+ runwrap tune_dlm_hash_sizes \
+ none \
+ "Tuning DLM kernel hash tables"
+
runwrap start_gfs_controld \
none \
"Starting gfs_controld"
diff --git a/cman/init.d/cman.init.defaults.in b/cman/init.d/cman.init.defaults.in
index 1b7913e..bbaa049 100644
--- a/cman/init.d/cman.init.defaults.in
+++ b/cman/init.d/cman.init.defaults.in
@@ -34,6 +34,13 @@
# DLM_CONTROLD_OPTS -- allow extra options to be passed to dlm_controld daemon.
#DLM_CONTROLD_OPTS=""
+# DLM_LKBTBL_SIZE - DLM_RSBTBL_SIZE - DLM_DIRTBL_SIZE
+# Allow tuning of DLM kernel hash table sizes.
+# do NOT change unless instructed to do so.
+#DLM_LKBTBL_SIZE=""
+#DLM_RSBTBL_SIZE=""
+#DLM_DIRTBL_SIZE=""
+
# FENCE_JOIN_TIMEOUT -- seconds to wait for fence domain join to
# complete. If the join hasn't completed in this time, fence_tool join
# exits with an error, and this script exits with an error. To wait
11 years, 8 months
cluster: RHEL59 - fence_xvm: Fix incorrect success return codes
by Ryan McCabe
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=0a588f475af...
Commit: 0a588f475afdb78660b424587f2c6460d4f1be82
Parent: 9eccf2611b6bfd92e4b15196b4744f24991a7bb8
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Wed Jul 25 10:52:33 2012 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Wed Jul 25 10:52:33 2012 -0400
fence_xvm: Fix incorrect success return codes
This patch fixes two places where fence_xvm will return success
for fencing operations when fencing has failed due to the
challenge/response failing.
Resolves: rhbz#843083
Signed-off-by: Lon Hohberger <lhh(a)redhat.com>
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
fence/agents/xvm/fence_xvm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fence/agents/xvm/fence_xvm.c b/fence/agents/xvm/fence_xvm.c
index d1ffb12..eb006fd 100644
--- a/fence/agents/xvm/fence_xvm.c
+++ b/fence/agents/xvm/fence_xvm.c
@@ -99,14 +99,14 @@ tcp_exchange(int fd, fence_auth_type_t auth, void *key,
if (tcp_challenge(fd, auth, key, key_len, timeout) <= 0) {
/* Challenge failed */
printf("Invalid response to challenge\n");
- return 0;
+ return 1;
}
/* Now they'll send us one, so we need to respond here */
dbg_printf(3, "Responding to TCP challenge\n");
if (tcp_response(fd, auth, key, key_len, timeout) <= 0) {
printf("Invalid response to challenge\n");
- return 0;
+ return 1;
}
dbg_printf(2, "TCP Exchange + Authentication done... \n");
11 years, 8 months
cluster: STABLE32 - cman init: allow dlm hash table sizes to be tunable at startup
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=c65a13a8218...
Commit: c65a13a82189f38bd80d5c52924d09a7d98daa37
Parent: 224a841585ea300718f9e82d9fadd0f163233e8f
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Wed Jul 25 07:21:19 2012 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Wed Jul 25 07:21:19 2012 +0200
cman init: allow dlm hash table sizes to be tunable at startup
Resolves: rhbz#842370
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/init.d/cman.in | 28 ++++++++++++++++++++++++++++
cman/init.d/cman.init.defaults.in | 7 +++++++
2 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index c6e038e..64d12de 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -119,6 +119,13 @@ fi
# DLM_CONTROLD_OPTS -- allow extra options to be passed to dlm_controld daemon.
[ -z "$DLM_CONTROLD_OPTS" ] && DLM_CONTROLD_OPTS=""
+# DLM_LKBTBL_SIZE - DLM_RSBTBL_SIZE - DLM_DIRTBL_SIZE
+# Allow tuning of DLM kernel hash table sizes.
+# do NOT change unless instructed to do so.
+[ -z "$DLM_LKBTBL_SIZE" ] && DLM_LKBTBL_SIZE=""
+[ -z "$DLM_RSBTBL_SIZE" ] && DLM_RSBTBL_SIZE=""
+[ -z "$DLM_DIRTBL_SIZE" ] && DLM_DIRTBL_SIZE=""
+
# FENCE_JOIN_TIMEOUT -- seconds to wait for fence domain join to
# complete. If the join hasn't completed in this time, fence_tool join
# exits with an error, and this script exits with an error. To wait
@@ -755,6 +762,23 @@ leave_fence_domain()
fi
}
+tune_dlm_hash_sizes()
+{
+ dlmdir="/sys/kernel/config/dlm/cluster"
+
+ [ -n "$DLM_LKBTBL_SIZE" ] && [ -f $dlmdir/lkbtbl_size ] && \
+ echo $DLM_LKBTBL_SIZE > $dlmdir/lkbtbl_size
+
+ [ -n "$DLM_RSBTBL_SIZE" ] && [ -f $dlmdir/rsbtbl_size ] && \
+ echo $DLM_RSBTBL_SIZE > $dlmdir/rsbtbl_size
+
+ [ -n "$DLM_DIRTBL_SIZE" ] && [ -f $dlmdir/dirtbl_size ] && \
+ echo $DLM_DIRTBL_SIZE > $dlmdir/dirtbl_size
+
+ return 0
+}
+
+
start()
{
currentaction="start"
@@ -822,6 +846,10 @@ start()
dlm_controld_enabled \
"Starting dlm_controld"
+ runwrap tune_dlm_hash_sizes \
+ none \
+ "Tuning DLM kernel hash tables"
+
gfs_controld_enabled && cd @INITDDIR@ && ./gfs2-cluster start
runwrap start_ocfs2_controld \
diff --git a/cman/init.d/cman.init.defaults.in b/cman/init.d/cman.init.defaults.in
index 5be97ff..03b2474 100644
--- a/cman/init.d/cman.init.defaults.in
+++ b/cman/init.d/cman.init.defaults.in
@@ -42,6 +42,13 @@
# DLM_CONTROLD_OPTS -- allow extra options to be passed to dlm_controld daemon.
#DLM_CONTROLD_OPTS=""
+# DLM_LKBTBL_SIZE - DLM_RSBTBL_SIZE - DLM_DIRTBL_SIZE
+# Allow tuning of DLM kernel hash table sizes.
+# do NOT change unless instructed to do so.
+#DLM_LKBTBL_SIZE=""
+#DLM_RSBTBL_SIZE=""
+#DLM_DIRTBL_SIZE=""
+
# FENCE_JOIN_TIMEOUT -- seconds to wait for fence domain join to
# complete. If the join hasn't completed in this time, fence_tool join
# exits with an error, and this script exits with an error. To wait
11 years, 8 months