LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File cman_sysconfig_part1.patch of Package cluster (Project home:sschapiro:openstack:upstream)

commit 11e1bbd561140f1bf9d7a6468893a5058d552dbf
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
Date:   Fri Jul 9 13:16:05 2010 +0200

    cman: add default config snippet for cman init script
    
    On Debian/Ubuntu this would be the equivalent of /etc/default/cman
    On Red Hat/Fedora this would be /etc/sysconfig/cman
    
    NOTE: we don't install this by default as it would imply detecting
    the build OS. Packages can deal with that manually.
    
    Resolves: rhbz#606368
    
    Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>

diff --git a/cman/init.d/Makefile b/cman/init.d/Makefile
index dca9c37..1ce42d6 100644
--- a/cman/init.d/Makefile
+++ b/cman/init.d/Makefile
@@ -1,6 +1,6 @@
-TARGET=cman
+TARGET=cman cman.init.defaults
 
-INITDT=$(TARGET)
+INITDT=cman 
 
 all: $(TARGET)
 
@@ -9,13 +9,13 @@ include $(OBJDIR)/make/clean.mk
 include $(OBJDIR)/make/install.mk
 include $(OBJDIR)/make/uninstall.mk
 
-$(TARGET): $(S)/$(TARGET).in
-	cat $(S)/$(TARGET).in | sed \
+%: $(S)/%.in
+	cat $^ | sed \
 		-e 's#@SBINDIR@#${sbindir}#g' \
 		-e 's#@INITDDIR@#${initddir}#g' \
 		-e 's#@NOTIFYDDIR@#${notifyddir}#g' \
 		-e 's#@CONFDIR@#${CONFDIR}#g' \
 		-e 's#@CONFFILE@#${CONFFILE}#g' \
-	> $(TARGET)
+	> $@
 
 clean: generalclean
diff --git a/cman/init.d/cman.init.defaults.in b/cman/init.d/cman.init.defaults.in
new file mode 100644
index 0000000..1f031b8
--- /dev/null
+++ b/cman/init.d/cman.init.defaults.in
@@ -0,0 +1,94 @@
+# CMAN_CLUSTER_TIMEOUT -- amount of time to wait for joinging a cluster
+#     before giving up.  If CMAN_CLUSTER_TIMEOUT is positive, then we will
+#     wait CMAN_CLUSTER_TIMEOUT seconds before giving up and failing when
+#     a cluster is not joined.  If CMAN_CLUSTER_TIMEOUT is zero, then
+#     wait indefinately for a cluster join.  If CMAN_CLUSTER_TIMEOUT is
+#     negative, do not check to see that the cluster has been joined
+#CMAN_CLUSTER_TIMEOUT=60
+
+# CMAN_QUORUM_TIMEOUT -- amount of time to wait for a quorate cluster on
+#     startup quorum is needed by many other applications, so we may as
+#     well wait here.  If CMAN_QUORUM_TIMEOUT is zero, quorum will
+#     be ignored.
+#CMAN_QUORUM_TIMEOUT=20
+
+# CMAN_SHUTDOWN_TIMEOUT -- amount of time to wait for cman to become a
+#     cluster member before calling cman_tool leave during shutdown.
+#     The default is 60 seconds
+#CMAN_SHUTDOWN_TIMEOUT=60
+
+# CMAN_NOTIFYD_START - control the startup behaviour for cmannotifyd
+# the variable can take 3 values:
+# yes                   | will always start cmannotifyd
+# no                    | will never start cmannotifyd
+# conditional (default) | will start cmannotifyd only if scriptlets
+#                         are found in @NOTIFYDDIR@
+#CMAN_NOTIFYD_START=conditional
+
+# CMAN_SSHD_START - control sshd startup behaviour
+# the variable can take 2 values:
+# yes                   | cman will start sshd as early as possible
+# no (default)          | cman will not start sshd
+#CMAN_SSHD_START=no
+
+# 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
+#     indefinitely set the value to -1.
+#FENCE_JOIN_TIMEOUT=20
+
+# FENCED_MEMBER_DELAY -- amount of time to delay fence_tool join to allow
+#     all nodes in cluster.conf to become cluster members.  In seconds.
+#FENCED_MEMBER_DELAY=45
+
+# FENCE_JOIN -- boolean value used to control whether or not this node
+#     should join the fence domain. If FENCE_JOIN is set to "no", then
+#     the script will not attempt to the fence domain. If FENCE_JOIN is
+#     set to "yes", then the script will attempt to join the fence domain.
+#     If FENCE_JOIN is set to any other value, the default behavior is
+#     to join the fence domain (equivalent to "yes").
+#FENCE_JOIN="yes"
+
+# NETWORK_BRIDGE_SCRIPT -- script to use for xen network bridging.
+#     This script must exist in the /etc/xen/scripts directory.
+#     The default script is "network-bridge".
+#NETWORK_BRIDGE_SCRIPT="network-bridge"
+
+# CLUSTERNAME -- override clustername as specified in cluster.conf
+#CLUSTERNAME=""
+
+# NODENAME -- specify the nodename of this node. Default autodetected
+#NODENAME=""
+
+# CONFIG_LOADER -- select default config parser.
+# This can be:
+# xmlconfig       - read directly from cluster.conf and use ricci as default
+#                   config propagation method. (default)
+# ldapconfig      - read configuration from an ldap server.
+#                   Requires: COROSYNC_LDAP_URL or/and COROSYNC_LDAP_BASEDN 
+#                   envvar to be set.
+#                   LDAP_BINDDN and LDAP_BINDPWD have to be either both set
+#                   or both unset.
+# corosync_parser - use internal corosync config file parser.
+# openaisparser   - use internal openais config file parser.
+#CONFIG_LOADER=xmlconfig
+
+# CONFIG_VALIDATION -- select default config validation behaviour
+# This can be:
+# FAIL - Use a very strict checking. The config will not be loaded if there
+#        for any kind of warnings/errors.
+# WARN - Same as FAIL, but will allow the config to load (this is temporary
+#        the default behaviour)
+# NONE - Disable config validation. Highly discouraged.
+#CONFIG_VALIDATION=WARN
+
+# CMAN_LEAVE_OPTS -- allows extra options to be passed to cman_tool when leave
+#     operation is performed.
+#CMAN_LEAVE_OPTS=""
+
+# INITLOGLEVEL -- select how verbose the init script should be
+# possible values:
+# quiet           - only one line notification for start/stop operations
+# terse (default) - show only required activity
+# full            - show everything
+#INITLOGLEVEL=terse