Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=e6…
Commit: e6e7f1837b53d8f2095392afc30aca411307730c
Parent: ab50640bc9093597e237efe6b728f13542b1ec4f
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Mon Mar 28 16:12:05 2011 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Mon Mar 28 16:12:05 2011 +0200
cman preconfig: fix segfault if we cannot determine cluster name
This takes a lot of effort to reproduce, but it can still happen.
Resolves: rhbz#651375
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/daemon/cman-preconfig.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/cman/daemon/cman-preconfig.c b/cman/daemon/cman-preconfig.c
index d64da25..a890fb3 100644
--- a/cman/daemon/cman-preconfig.c
+++ b/cman/daemon/cman-preconfig.c
@@ -1275,6 +1275,11 @@ static int get_cman_globals(struct objdb_iface_ver0 *objdb)
objdb_get_string(objdb, cluster_parent_handle, "name", &cluster_name);
+ if (!cluster_name) {
+ sprintf(error_reason, "Unable to determine cluster name.\n");
+ return -1;
+ }
+
/* Get the <cman> bits that override <totem> bits */
objdb->object_find_create(cluster_parent_handle, "cman", strlen("cman"), &find_handle);
if (objdb->object_find_next(find_handle, &object_handle) == 0) {
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=e7…
Commit: e7d91758422f354a3488db5f9d375484b4be4535
Parent: 70df7a300dac3e598fba0d5585bae3a2f8bead23
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Mon Mar 28 12:46:03 2011 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Mon Mar 28 12:46:03 2011 +0200
config: add more totem options to relax ng schema for config validation
Original patch by Vladislav Bogdanov <bubble(a)hoster-ok.com>
Resolves: rhbz#689123
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
config/tools/xml/cluster.rng.in | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/config/tools/xml/cluster.rng.in b/config/tools/xml/cluster.rng.in
index c873cae..8ba6df6 100644
--- a/config/tools/xml/cluster.rng.in
+++ b/config/tools/xml/cluster.rng.in
@@ -197,6 +197,36 @@ To validate your cluster.conf against this schema, run:
<attribute name="fail_recv_const" />
</optional>
<optional>
+ <attribute name="seqno_unchanged_const"
+ rha:description="Specifies how many rotations of the token without
+ any multicast traffic should occur before the merge detection timeout
+ is started." rha:default="30" rha:sample="5000"/>
+ </optional>
+ <optional>
+ <attribute name="netmtu"
+ rha:description="Specifies the network maximum transmit unit. To set
+ this value beyond 1500, the regular frame MTU, requires ethernet
+ devices that support large, or also called jumbo, frames. If any
+ device in the network does not support large frames, the protocol will
+ not operate properly. The hosts must also have their mtu size set
+ from 1500 to whatever frame size is specified here."
+ rha:default="1500" rha:sample="9174"/>
+ </optional>
+ <optional>
+ <attribute name="window_size"
+ rha:description="Specifies the maximum number of messages that may
+ be sent on one token rotation. window_size should be no larger then
+ 256000 / netmtu to avoid overflow of the kernel receive buffers."
+ rha:default="50" rha:sample="300"/>
+ </optional>
+ <optional>
+ <attribute name="max_messages"
+ rha:description="Specifies the maximum number of messages that may
+ be sent by one processor on receipt of the token. This parameter is
+ limited to 256000 / netmtu to prevent overflow of the kernel
+ transmit buffers" rha:default="17" rha:sample="25"/>
+ </optional>
+ <optional>
<attribute name="token_retransmits_before_loss_const"
rha:description="This value identifies how many token retransmits
should be attempted before forming a new configuration. If
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=70…
Commit: 70df7a300dac3e598fba0d5585bae3a2f8bead23
Parent: e5dd95786c6850866f0ffa15fe9fe564cbd9f765
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Mon Mar 28 11:46:27 2011 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Mon Mar 28 11:46:27 2011 +0200
cman init: add config option to disable _controld daemons startup
In some pacemaker clusters it is not desirable to lunch _controld daemons
from cman init, but allow pacemaker to handle them as resources.
this patch adds CMAN_DAEMONS_START startup option to handle this specific
case.
Original patch by Vladislav Bogdanov <bubble(a)hoster-ok.com>
Resolves: rhbz#690169
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
cman/init.d/cman.in | 27 +++++++++++++++++++++++++--
cman/init.d/cman.init.defaults.in | 8 ++++++++
2 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in
index 12f428f..0fcf52a 100644
--- a/cman/init.d/cman.in
+++ b/cman/init.d/cman.in
@@ -105,6 +105,14 @@ fi
# no (default) | cman will not start sshd
[ -z "$CMAN_SSHD_START" ] && CMAN_SSHD_START=no
+# CMAN_DAEMONS_START -- Set to "no" to disable {dlm,gfs,ocfs2}-controld daemons
+# execution from within cman init script
+# (Can be useful for some pacemaker-based setups).
+# values:
+# no | cman init will NOT start the daemons
+# empty or any other value (default) | cman init will start the daemons
+#CMAN_DAEMONS_START=
+
# 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
@@ -297,8 +305,22 @@ sshd_enabled()
return 1
}
+control_daemons_enabled()
+{
+ [ "$CMAN_DAEMONS_START" = "no" ] && return 1
+ return 0
+}
+
+dlm_controld_enabled()
+{
+ control_daemons_enabled
+ return $?
+}
+
gfs_controld_enabled()
{
+ ! control_daemons_enabled && return 1
+
if [ -f @INITDDIR@/gfs2-cluster ] && ! chkconfig2 gfs2-cluster; then
return 0
fi
@@ -415,6 +437,7 @@ groupd_enabled()
ocfs2_enabled()
{
+ ! control_daemons_enabled && return 1
ocfs2_cluster="$(cat /sys/fs/ocfs2/cluster_stack 2>/dev/null || true)"
[ "$ocfs2_cluster" != cman ] && return 1
return 0
@@ -782,7 +805,7 @@ start()
"Starting fenced"
runwrap start_dlm_controld \
- none \
+ dlm_controld_enabled \
"Starting dlm_controld"
gfs_controld_enabled && cd @INITDDIR@ && ./gfs2-cluster start
@@ -821,7 +844,7 @@ stop()
gfs_controld_enabled && cd @INITDDIR@ && ./gfs2-cluster stop
runwrap stop_dlm_controld \
- none \
+ dlm_controld_enabled \
"Stopping dlm_controld"
runwrap stop_fenced \
diff --git a/cman/init.d/cman.init.defaults.in b/cman/init.d/cman.init.defaults.in
index ac21c97..04b3b5b 100644
--- a/cman/init.d/cman.init.defaults.in
+++ b/cman/init.d/cman.init.defaults.in
@@ -31,6 +31,14 @@
# no (default) | cman will not start sshd
#CMAN_SSHD_START=no
+# CMAN_DAEMONS_START -- Set to "no" to disable {dlm,gfs,ocfs2}-controld daemons
+# execution from within cman init script
+# (Can be useful for some pacemaker-based setups).
+# values:
+# no | cman init will NOT start the daemons
+# empty or any other value (default) | cman init will start the daemons
+#CMAN_DAEMONS_START=
+
# 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