cluster_configure: Updates for new style CTDB configuration
authorMartin Schwenke <martin@meltin.net>
Mon, 23 Apr 2018 04:31:49 +0000 (14:31 +1000)
committerMartin Schwenke <martin@meltin.net>
Tue, 24 Apr 2018 03:24:09 +0000 (13:24 +1000)
This is an intermediate change for CTDB 4.9.0pre versions that use the
new configuration file but still required the CTDB_MANAGED_*
variables.

Signed-off-by: Martin Schwenke <martin@meltin.net>
base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/events/post [new file with mode: 0755]
base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/ctdb.conf [new file with mode: 0644]
base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses [new file with mode: 0644]
base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.dual [new file with mode: 0644]
base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.ipv4 [new file with mode: 0644]
base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.ipv6 [new file with mode: 0644]
base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/script.options [new file with mode: 0644]
base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/sysconfig/ctdb [new file with mode: 0644]

diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/events/post b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/events/post
new file mode 100755 (executable)
index 0000000..1777cff
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+. /etc/sysconfig/ctdb
+if [ -n "$CTDB_RECOVERY_LOCK" ] ; then
+    d=$(dirname "$CTDB_RECOVERY_LOCK")
+    mkdir -p "$d"
+fi
+
+exec service ctdb restart
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/ctdb.conf b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/ctdb.conf
new file mode 100644 (file)
index 0000000..159df0f
--- /dev/null
@@ -0,0 +1,6 @@
+[logging]
+       location = syslog
+       log level = NOTICE
+
+[cluster]
+       recovery lock = @@CLUSTERFS_DEFAULT_MOUNTPOINT@@/.ctdb/recovery.lock
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses
new file mode 100644 (file)
index 0000000..e2053a7
--- /dev/null
@@ -0,0 +1 @@
+!!%ctdb:gen_public_addresses('default')!!
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.dual b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.dual
new file mode 100644 (file)
index 0000000..9aecdac
--- /dev/null
@@ -0,0 +1 @@
+!!%ctdb:gen_public_addresses('dual')!!
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.ipv4 b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.ipv4
new file mode 100644 (file)
index 0000000..3ab0921
--- /dev/null
@@ -0,0 +1 @@
+!!%ctdb:gen_public_addresses('ipv4')!!
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.ipv6 b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/public_addresses.ipv6
new file mode 100644 (file)
index 0000000..4a67496
--- /dev/null
@@ -0,0 +1 @@
+!!%ctdb:gen_public_addresses('ipv6')!!
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/script.options b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/ctdb/script.options
new file mode 100644 (file)
index 0000000..092c53d
--- /dev/null
@@ -0,0 +1,8 @@
+# These could be in per-event-script files but this is more convenient
+# for now
+
+CTDB_MANAGES_SAMBA=yes
+CTDB_MANAGES_WINBIND=!!|"yes" if self.config.get("package:ctdb", "auth_method") == "winbind" else "no"!!
+CTDB_MANAGES_NFS=yes
+CTDB_MANAGES_HTTPD=yes
+CTDB_MANAGES_VSFTPD=yes
diff --git a/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/sysconfig/ctdb b/base/all/root/scripts/cluster_configure/templates/rhel/00.ctdb/4.9.0#/files/etc/sysconfig/ctdb
new file mode 100644 (file)
index 0000000..384cdd1
--- /dev/null
@@ -0,0 +1,20 @@
+# Core 
+CTDB_PUBLIC_ADDRESSES=/etc/ctdb/public_addresses
+CTDB_RECOVERY_LOCK=@@CLUSTERFS_DEFAULT_MOUNTPOINT@@/.ctdb/recovery.lock
+
+# Services managed
+CTDB_MANAGES_SAMBA=yes
+CTDB_MANAGES_WINBIND=!!|"yes" if self.config.get("package:ctdb", "auth_method") == "winbind" else "no"!!
+CTDB_MANAGES_NFS=yes
+CTDB_MANAGES_HTTPD=yes
+CTDB_MANAGES_VSFTPD=yes
+
+# System
+ulimit -n 1048576
+ulimit -c unlimited
+
+# Logging
+CTDB_LOGGING="syslog"
+CTDB_SYSLOG="yes" # backward compatibility
+CTDB_DEBUGLEVEL=NOTICE
+CTDB_LOG_RINGBUF_SIZE=500000