Blame SOURCES/bz1731427-CTDB-2-add-v4.9-support.patch

716f78
From 30b9f55325d2acfba27aa6859c7360e10b7201d7 Mon Sep 17 00:00:00 2001
716f78
From: David Disseldorp <ddiss@suse.de>
716f78
Date: Wed, 5 Jun 2019 00:41:13 +0200
716f78
Subject: [PATCH 1/3] CTDB: support Samba 4.9+
716f78
716f78
With Samba 4.9+, all ctdbd parameters have moved to config files.
716f78
Generate a new /etc/ctdb/ctdb.conf file during ctdb startup, based on RA
716f78
configuration.
716f78
716f78
Event scripts in Samba 4.9+ are also no longer enabled/disabled based on
716f78
file mode. Use the "ctdb event script enable/disable" helpers, which now
716f78
work without a running ctdbd.
716f78
716f78
Fixes: https://github.com/ClusterLabs/resource-agents/issues/1196
716f78
Signed-off-by: David Disseldorp <ddiss@suse.de>
716f78
Signed-off-by: Noel Power <noel.power@suse.com>
716f78
Signed-off-by: Amitay Isaacs <amitay@samba.org>
716f78
---
716f78
 heartbeat/CTDB.in | 214 ++++++++++++++++++++++++++++++++++++----------
716f78
 1 file changed, 167 insertions(+), 47 deletions(-)
716f78
716f78
diff --git a/heartbeat/CTDB.in b/heartbeat/CTDB.in
716f78
index 4dd646896..79a2f97e7 100755
716f78
--- a/heartbeat/CTDB.in
716f78
+++ b/heartbeat/CTDB.in
716f78
@@ -143,6 +143,10 @@ OCF_RESKEY_smb_fileid_algorithm_default=""
716f78
 
716f78
 #######################################################################
716f78
 
716f78
+ctdb_version() {
716f78
+	$OCF_RESKEY_ctdb_binary version | awk '{print $NF}' | sed "s/[-\.]\?[[:alpha:]].*//"
716f78
+}
716f78
+
716f78
 meta_data() {
716f78
 	cat <
716f78
 
716f78
@@ -256,7 +260,7 @@ host any public ip addresses.
716f78
 <longdesc lang="en">
716f78
 The directory containing various CTDB configuration files.
716f78
 The "nodes" and "notify.sh" scripts are expected to be
716f78
-in this directory, as is the "events.d" subdirectory.
716f78
+in this directory.
716f78
 </longdesc>
716f78
 <shortdesc lang="en">CTDB config file directory</shortdesc>
716f78
 <content type="string" default="/etc/ctdb" />
716f78
@@ -282,8 +286,10 @@ Full path to the CTDB cluster daemon binary.
716f78
 <longdesc lang="en">
716f78
 Full path to the domain socket that ctdbd will create, used for
716f78
 local clients to attach and communicate with the ctdb daemon.
716f78
+With CTDB 4.9.0 and later the socket path is hardcoded at build
716f78
+time, so this parameter is ignored.
716f78
 </longdesc>
716f78
-<shortdesc lang="en">CTDB socket location</shortdesc>
716f78
+<shortdesc lang="en">CTDB socket location (ignored with CTDB 4.9+)</shortdesc>
716f78
 <content type="string" default="${OCF_RESKEY_ctdb_socket}" />
716f78
 </parameter>
716f78
 
716f78
@@ -421,16 +427,28 @@ invoke_ctdb() {
716f78
 		timeout=$((OCF_RESKEY_CRM_meta_timeout/1000))
716f78
 		timelimit=$((OCF_RESKEY_CRM_meta_timeout/1000))
716f78
 	fi
716f78
-	$OCF_RESKEY_ctdb_binary --socket="$OCF_RESKEY_ctdb_socket" \
716f78
-		-t $timeout -T $timelimit \
716f78
-		"$@"
716f78
+
716f78
+	local vers=$(ctdb_version)
716f78
+	ocf_version_cmp "$vers" "4.9.0"
716f78
+
716f78
+	# if version < 4.9.0 specify '--socket' otherwise it's
716f78
+	# a compiled option
716f78
+	if [ "$?" -eq "0" ]; then
716f78
+		$OCF_RESKEY_ctdb_binary --socket="$OCF_RESKEY_ctdb_socket" \
716f78
+			-t $timeout -T $timelimit \
716f78
+			"$@"
716f78
+	else
716f78
+		$OCF_RESKEY_ctdb_binary \
716f78
+			-t $timeout -T $timelimit \
716f78
+			"$@"
716f78
+	fi
716f78
 }
716f78
 
716f78
 # Enable any event scripts that are explicitly required.
716f78
 # Any others will ultimately be invoked or not based on how they ship
716f78
 # with CTDB, but will generally have no effect, beacuase the relevant
716f78
 # CTDB_MANAGES_* options won't be set in /etc/sysconfig/ctdb.
716f78
-enable_event_scripts() {
716f78
+enable_event_scripts_chmod() {
716f78
 	local event_dir
716f78
 	event_dir=$OCF_RESKEY_ctdb_config_dir/events.d
716f78
 
716f78
@@ -454,6 +472,36 @@ enable_event_scripts() {
716f78
 	fi
716f78
 }
716f78
 
716f78
+enable_event_scripts_symlink() {
716f78
+	# event scripts are symlinked once enabled, with the link source in...
716f78
+	mkdir -p "$OCF_RESKEY_ctdb_config_dir/events/legacy" 2>/dev/null
716f78
+
716f78
+	invoke_ctdb event script enable legacy 00.ctdb
716f78
+
716f78
+	if [ -f "${OCF_RESKEY_ctdb_config_dir}/public_addresses" ]; then
716f78
+		invoke_ctdb event script enable legacy 10.interface
716f78
+	else
716f78
+		invoke_ctdb event script disable legacy 10.interface
716f78
+	fi
716f78
+	if [ -f "${OCF_RESKEY_ctdb_config_dir}/static-routes" ]; then
716f78
+		invoke_ctdb event script enable legacy 11.routing
716f78
+	else
716f78
+		invoke_ctdb event script disable legacy 11.routing
716f78
+	fi
716f78
+
716f78
+	if ocf_is_true "$OCF_RESKEY_ctdb_manages_winbind"; then
716f78
+		invoke_ctdb event script enable legacy 49.winbind
716f78
+	else
716f78
+		invoke_ctdb event script disable legacy 49.winbind
716f78
+	fi
716f78
+
716f78
+	if ocf_is_true "$OCF_RESKEY_ctdb_manages_samba"; then
716f78
+		invoke_ctdb event script enable legacy 50.samba
716f78
+	else
716f78
+		invoke_ctdb event script disable legacy 50.samba
716f78
+	fi
716f78
+}
716f78
+
716f78
 # This function has no effect (currently no way to set CTDB_SET_*)
716f78
 # but remains here in case we need it in future.
716f78
 set_ctdb_variables() {
716f78
@@ -556,6 +604,46 @@ append_ctdb_sysconfig() {
716f78
 	[ -n "$2" ] && echo "$1=$2" >> "$CTDB_SYSCONFIG"
716f78
 }
716f78
 
716f78
+generate_ctdb_config() {
716f78
+	local ctdb_config="$OCF_RESKEY_ctdb_config_dir/ctdb.conf"
716f78
+
716f78
+	# Backup existing config if we're not already using an auto-generated one
716f78
+	grep -qa '# CTDB-RA: Auto-generated' $ctdb_config || cp -p $ctdb_config ${ctdb_config}.ctdb-ra-orig
716f78
+	if [ $? -ne 0 ]; then
716f78
+		ocf_log warn "Unable to backup $ctdb_config to ${ctdb_config}.ctdb-ra-orig"
716f78
+	fi
716f78
+
716f78
+	local log_option="file:$OCF_RESKEY_ctdb_logfile"
716f78
+	if [ "$OCF_RESKEY_ctdb_logfile" = "syslog" ]; then
716f78
+		log_option="syslog"
716f78
+	fi
716f78
+
716f78
+	local start_as_disabled="false"
716f78
+	ocf_is_true "$OCF_RESKEY_ctdb_start_as_disabled" && start_as_disabled="true"
716f78
+
716f78
+	local dbdir_volatile="$OCF_RESKEY_ctdb_dbdir/volatile"
716f78
+	[ -d "$dbdir_volatile" ] || mkdir -p "$dbdir_volatile" 2>/dev/null
716f78
+	local dbdir_persistent="$OCF_RESKEY_ctdb_dbdir/persistent"
716f78
+	[ -d "$dbdir_persistent" ] || mkdir -p "$dbdir_persistent" 2>/dev/null
716f78
+	local dbdir_state="$OCF_RESKEY_ctdb_dbdir/state"
716f78
+	[ -d "$dbdir_state" ] || mkdir -p "$dbdir_state" 2>/dev/null
716f78
+
716f78
+cat >$ctdb_config <
716f78
+# CTDB-RA: Auto-generated
716f78
+[logging]
716f78
+	location = $log_option
716f78
+	log level = $OCF_RESKEY_ctdb_debuglevel
716f78
+[cluster]
716f78
+	recovery lock = $OCF_RESKEY_ctdb_recovery_lock
716f78
+[database]
716f78
+	volatile database directory = $dbdir_volatile
716f78
+	persistent database directory = $dbdir_persistent
716f78
+	state database directory = $dbdir_state
716f78
+[legacy]
716f78
+	start as disabled = $start_as_disabled
716f78
+EOF
716f78
+}
716f78
+
716f78
 # Generate a new, minimal CTDB config file that's just enough
716f78
 # to get CTDB running as configured by the RA parameters.
716f78
 generate_ctdb_sysconfig() {
716f78
@@ -589,6 +677,58 @@ EOF
716f78
 }
716f78
 
716f78
 
716f78
+invoke_ctdbd() {
716f78
+	local vers="$1"
716f78
+
716f78
+	ocf_version_cmp "$vers" "4.9.0"
716f78
+	if [ "$?" -ne "0" ]; then
716f78
+		# With 4.9+, all ctdbd binary parameters are provided as
716f78
+		# config settings
716f78
+		$OCF_RESKEY_ctdbd_binary
716f78
+		return
716f78
+	fi
716f78
+
716f78
+	# Use logfile by default, or syslog if asked for
716f78
+	local log_option
716f78
+	# --logging supported from v4.3.0 and --logfile / --syslog support
716f78
+	# has been removed from newer versions
716f78
+	ocf_version_cmp "$vers" "4.2.14"
716f78
+	if [ "$?" -eq "2" ]; then
716f78
+		log_option="--logging=file:$OCF_RESKEY_ctdb_logfile"
716f78
+		if [ "$OCF_RESKEY_ctdb_logfile" = "syslog" ]; then
716f78
+			log_option="--logging=syslog"
716f78
+		fi
716f78
+	else
716f78
+		log_option="--logfile=$OCF_RESKEY_ctdb_logfile"
716f78
+		if [ "$OCF_RESKEY_ctdb_logfile" = "syslog" ]; then
716f78
+			log_option="--syslog"
716f78
+		fi
716f78
+	fi
716f78
+
716f78
+	# public addresses file (should not be present, but need to set for correctness if it is)
716f78
+	local pub_addr_option
716f78
+	pub_addr_option=""
716f78
+	[ -f "${OCF_RESKEY_ctdb_config_dir}/public_addresses" ] && \
716f78
+		pub_addr_option="--public-addresses=${OCF_RESKEY_ctdb_config_dir}/public_addresses"
716f78
+	# start as disabled
716f78
+	local start_as_disabled
716f78
+	start_as_disabled="--start-as-disabled"
716f78
+	ocf_is_true "$OCF_RESKEY_ctdb_start_as_disabled" || start_as_disabled=""
716f78
+
716f78
+	$OCF_RESKEY_ctdbd_binary \
716f78
+		--reclock="$OCF_RESKEY_ctdb_recovery_lock" \
716f78
+		--nlist="$OCF_RESKEY_ctdb_config_dir/nodes" \
716f78
+		--socket="$OCF_RESKEY_ctdb_socket" \
716f78
+		--dbdir="$OCF_RESKEY_ctdb_dbdir" \
716f78
+		--dbdir-persistent="$OCF_RESKEY_ctdb_dbdir/persistent" \
716f78
+		--event-script-dir="$OCF_RESKEY_ctdb_config_dir/events.d" \
716f78
+		--notification-script="$OCF_RESKEY_ctdb_config_dir/notify.sh" \
716f78
+		--transport=tcp \
716f78
+		$start_as_disabled $log_option $pub_addr_option \
716f78
+		-d "$OCF_RESKEY_ctdb_debuglevel"
716f78
+}
716f78
+
716f78
+
716f78
 ctdb_usage() {
716f78
 	cat <
716f78
 usage: $0 {start|stop|monitor|validate-all|meta-data}
716f78
@@ -614,27 +754,26 @@ ctdb_start() {
716f78
 		return $OCF_ERR_GENERIC
716f78
 	fi
716f78
 
716f78
-	# Generate new CTDB sysconfig
716f78
-	generate_ctdb_sysconfig
716f78
-	enable_event_scripts
716f78
+	local version=$(ctdb_version)
716f78
 
716f78
-	# Use logfile by default, or syslog if asked for
716f78
-	local log_option
716f78
-	# --logging supported from v4.3.0 and --logfile / --syslog support 
716f78
-	# has been removed from newer versions
716f78
-	version=$(ctdb version | awk '{print $NF}')
716f78
-	ocf_version_cmp "$version" "4.2.14"
716f78
-	if [ "$?" -eq "2" ]; then
716f78
-		log_option="--logging=file:$OCF_RESKEY_ctdb_logfile"
716f78
-		if [ "$OCF_RESKEY_ctdb_logfile" = "syslog" ]; then
716f78
-			log_option="--logging=syslog"
716f78
-		fi
716f78
+	ocf_version_cmp "$version" "4.9.0"
716f78
+	if [ "$?" -eq "0" ]; then
716f78
+		# prior to 4.9, ctdbd parameters are in sysconfig or passed as
716f78
+		# binary arguments
716f78
+		generate_ctdb_sysconfig
716f78
+
716f78
+		# prior to 4.9, event script enablement without a running
716f78
+		# ctdbd is done by chmoding the scripts directly
716f78
+		enable_event_scripts_chmod
716f78
 	else
716f78
-		log_option="--logfile=$OCF_RESKEY_ctdb_logfile"
716f78
-		if [ "$OCF_RESKEY_ctdb_logfile" = "syslog" ]; then
716f78
-			log_option="--syslog"
716f78
-		fi
716f78
+		# 4.9+ moves all ctdbd parameters to ctdb.conf
716f78
+		generate_ctdb_config
716f78
+
716f78
+		# 4.9+ event scripts can be enabled with ctdb directly, which
716f78
+		# performs a symlink
716f78
+		enable_event_scripts_symlink
716f78
 	fi
716f78
+
716f78
 	if [ ! -d "$(dirname $OCF_RESKEY_ctdb_logfile)" ]; then
716f78
 		# ensure the logfile's directory exists, otherwise ctdb will fail to start
716f78
 		mkdir -p $(dirname $OCF_RESKEY_ctdb_logfile)
716f78
@@ -643,33 +782,14 @@ ctdb_start() {
716f78
 	# ensure ctdb's rundir exists, otherwise it will fail to start
716f78
 	mkdir -p $OCF_RESKEY_ctdb_rundir 2>/dev/null
716f78
 
716f78
-	# public addresses file (should not be present, but need to set for correctness if it is)
716f78
-	local pub_addr_option
716f78
-	pub_addr_option=""
716f78
-	[ -f "${OCF_RESKEY_ctdb_config_dir}/public_addresses" ] && \
716f78
-		pub_addr_option="--public-addresses=${OCF_RESKEY_ctdb_config_dir}/public_addresses"
716f78
-	# start as disabled
716f78
-	local start_as_disabled
716f78
-	start_as_disabled="--start-as-disabled"
716f78
-	ocf_is_true "$OCF_RESKEY_ctdb_start_as_disabled" || start_as_disabled=""
716f78
-
716f78
 	# set nofile ulimit for ctdbd process
716f78
 	if [ -n "$OCF_RESKEY_ctdb_max_open_files" ]; then
716f78
 		ulimit -n "$OCF_RESKEY_ctdb_max_open_files"
716f78
 	fi
716f78
 
716f78
 	# Start her up
716f78
-	"$OCF_RESKEY_ctdbd_binary" \
716f78
-		--reclock="$OCF_RESKEY_ctdb_recovery_lock" \
716f78
-		--nlist="$OCF_RESKEY_ctdb_config_dir/nodes" \
716f78
-		--socket="$OCF_RESKEY_ctdb_socket" \
716f78
-		--dbdir="$OCF_RESKEY_ctdb_dbdir" \
716f78
-		--dbdir-persistent="$OCF_RESKEY_ctdb_dbdir/persistent" \
716f78
-		--event-script-dir="$OCF_RESKEY_ctdb_config_dir/events.d" \
716f78
-		--notification-script="$OCF_RESKEY_ctdb_config_dir/notify.sh" \
716f78
-		--transport=tcp \
716f78
-		$start_as_disabled $log_option $pub_addr_option \
716f78
-		-d "$OCF_RESKEY_ctdb_debuglevel"
716f78
+	invoke_ctdbd "$version"
716f78
+
716f78
 	if [ $? -ne 0 ]; then
716f78
 		# cleanup smb.conf
716f78
 		cleanup_smb_conf
716f78
@@ -688,7 +808,7 @@ ctdb_start() {
716f78
 			if [ $? -ne 0 ]; then
716f78
 				# CTDB will be running, kill it before returning
716f78
 				ctdb_stop
716f78
-				ocf_exit_reason "Can't invoke $OCF_RESKEY_ctdb_binary --socket=$OCF_RESKEY_ctdb_socket status"
716f78
+				ocf_exit_reason "Can't invoke $OCF_RESKEY_ctdb_binary status"
716f78
 				return $OCF_ERR_GENERIC
716f78
 			fi
716f78
 			if ! echo "$status" | grep -qs 'UNHEALTHY (THIS'; then
716f78
@@ -725,7 +845,7 @@ ctdb_stop() {
716f78
 		[ $count -gt 10 ] && {
716f78
 			ocf_log info "killing ctdbd "
716f78
 			pkill -9 -f "$OCF_RESKEY_ctdbd_binary"
716f78
-			pkill -9 -f "${OCF_RESKEY_ctdb_config_dir}/events.d/"
716f78
+			pkill -9 -f "${OCF_RESKEY_ctdb_config_dir}/events"
716f78
 		}
716f78
 	done
716f78
 
716f78
716f78
From b4753b7cb46045bb9e7ed5e3a0a20f6104264b12 Mon Sep 17 00:00:00 2001
716f78
From: David Disseldorp <ddiss@suse.de>
716f78
Date: Wed, 10 Jul 2019 17:11:50 +0200
716f78
Subject: [PATCH 2/3] CTDB: generate script.options file for 4.9+
716f78
716f78
Event scripts in CTDB 4.9+ ignore sysconfig configuration and instead
716f78
parse parameters in ctdb_config_dir/script.options .
716f78
716f78
Signed-off-by: David Disseldorp <ddiss@suse.de>
716f78
---
716f78
 heartbeat/CTDB.in | 35 ++++++++++++++++++++++++++++++-----
716f78
 1 file changed, 30 insertions(+), 5 deletions(-)
716f78
716f78
diff --git a/heartbeat/CTDB.in b/heartbeat/CTDB.in
716f78
index 79a2f97e7..0906f3da9 100755
716f78
--- a/heartbeat/CTDB.in
716f78
+++ b/heartbeat/CTDB.in
716f78
@@ -242,6 +242,7 @@ If the amount of free memory drops below this value the node will
716f78
 become unhealthy and ctdb and all managed services will be shutdown.
716f78
 Once this occurs, the administrator needs to find the reason for the
716f78
 OOM situation, rectify it and restart ctdb with "service ctdb start".
716f78
+With CTDB 4.4.0 and later this parameter is ignored.
716f78
 </longdesc>
716f78
 <shortdesc lang="en">Minimum amount of free memory (MB)</shortdesc>
716f78
 <content type="integer" default="${OCF_RESKEY_ctdb_monitor_free_memory_default}" />
716f78
@@ -600,8 +601,10 @@ cleanup_smb_conf() {
716f78
 	mv "$OCF_RESKEY_smb_conf.$$" "$OCF_RESKEY_smb_conf"
716f78
 }
716f78
 
716f78
-append_ctdb_sysconfig() {
716f78
-	[ -n "$2" ] && echo "$1=$2" >> "$CTDB_SYSCONFIG"
716f78
+append_conf() {
716f78
+	local file_path="$1"
716f78
+	shift
716f78
+	[ -n "$2" ] && echo "$1=$2" >> "$file_path"
716f78
 }
716f78
 
716f78
 generate_ctdb_config() {
716f78
@@ -644,6 +647,25 @@ cat >$ctdb_config <
716f78
 EOF
716f78
 }
716f78
 
716f78
+generate_event_script_options() {
716f78
+	local script_options="$OCF_RESKEY_ctdb_config_dir/script.options"
716f78
+
716f78
+	# Backup existing config if we're not already using an auto-generated one
716f78
+	grep -qa '# CTDB-RA: Auto-generated' $script_options || cp -p $script_options ${script_options}.ctdb-ra-orig
716f78
+	if [ $? -ne 0 ]; then
716f78
+		ocf_log warn "Unable to backup $script_options to ${script_options}.ctdb-ra-orig"
716f78
+	fi
716f78
+
716f78
+cat >$script_options <
716f78
+# CTDB-RA: Auto-generated
716f78
+CTDB_SAMBA_SKIP_SHARE_CHECK=$(ocf_is_true "$OCF_RESKEY_ctdb_samba_skip_share_check" && echo 'yes' || echo 'no')
716f78
+EOF
716f78
+
716f78
+	append_conf "$script_options" CTDB_SERVICE_SMB $OCF_RESKEY_ctdb_service_smb
716f78
+	append_conf "$script_options" CTDB_SERVICE_NMB $OCF_RESKEY_ctdb_service_nmb
716f78
+	append_conf "$script_options" CTDB_SERVICE_WINBIND $OCF_RESKEY_ctdb_service_winbind
716f78
+}
716f78
+
716f78
 # Generate a new, minimal CTDB config file that's just enough
716f78
 # to get CTDB running as configured by the RA parameters.
716f78
 generate_ctdb_sysconfig() {
716f78
@@ -671,9 +693,9 @@ CTDB_SAMBA_SKIP_SHARE_CHECK=$(ocf_is_true "$OCF_RESKEY_ctdb_samba_skip_share_che
716f78
 CTDB_MANAGES_SAMBA=$(ocf_is_true "$OCF_RESKEY_ctdb_manages_samba" && echo 'yes' || echo 'no')
716f78
 CTDB_MANAGES_WINBIND=$(ocf_is_true "$OCF_RESKEY_ctdb_manages_winbind" && echo 'yes' || echo 'no')
716f78
 EOF
716f78
-	append_ctdb_sysconfig CTDB_SERVICE_SMB $OCF_RESKEY_ctdb_service_smb
716f78
-	append_ctdb_sysconfig CTDB_SERVICE_NMB $OCF_RESKEY_ctdb_service_nmb
716f78
-	append_ctdb_sysconfig CTDB_SERVICE_WINBIND $OCF_RESKEY_ctdb_service_winbind
716f78
+	append_conf "$CTDB_SYSCONFIG" CTDB_SERVICE_SMB $OCF_RESKEY_ctdb_service_smb
716f78
+	append_conf "$CTDB_SYSCONFIG" CTDB_SERVICE_NMB $OCF_RESKEY_ctdb_service_nmb
716f78
+	append_conf "$CTDB_SYSCONFIG" CTDB_SERVICE_WINBIND $OCF_RESKEY_ctdb_service_winbind
716f78
 }
716f78
 
716f78
 
716f78
@@ -769,6 +791,9 @@ ctdb_start() {
716f78
 		# 4.9+ moves all ctdbd parameters to ctdb.conf
716f78
 		generate_ctdb_config
716f78
 
716f78
+		# 4.9+ event script options are in script.options
716f78
+		generate_event_script_options
716f78
+
716f78
 		# 4.9+ event scripts can be enabled with ctdb directly, which
716f78
 		# performs a symlink
716f78
 		enable_event_scripts_symlink
716f78
716f78
From 0a8610711f90c4cc7a2b380a4795f463532d9520 Mon Sep 17 00:00:00 2001
716f78
From: David Disseldorp <ddiss@suse.de>
716f78
Date: Wed, 10 Jul 2019 17:54:01 +0200
716f78
Subject: [PATCH 3/3] CTDB: drop sysconfig presence check during validate
716f78
716f78
There are two reasons to avoid this check:
716f78
- for ctdb versions prior to 4.9.0, the sysconfig file is generated by
716f78
  the resource agent start hook *after* ctdb_validate() is called.
716f78
- post 4.9.0 versions don't use the sysconfig file.
716f78
716f78
Signed-off-by: David Disseldorp <ddiss@suse.de>
716f78
---
716f78
 heartbeat/CTDB.in | 5 -----
716f78
 1 file changed, 5 deletions(-)
716f78
716f78
diff --git a/heartbeat/CTDB.in b/heartbeat/CTDB.in
716f78
index 0906f3da9..15d78902e 100755
716f78
--- a/heartbeat/CTDB.in
716f78
+++ b/heartbeat/CTDB.in
716f78
@@ -925,11 +925,6 @@ ctdb_validate() {
716f78
 		check_binary $binary
716f78
 	done
716f78
 
716f78
-	if [ -z "$CTDB_SYSCONFIG" ]; then
716f78
-		ocf_exit_reason "Can't find CTDB config file (expecting /etc/sysconfig/ctdb, /etc/default/ctdb or similar)"
716f78
-		return $OCF_ERR_INSTALLED
716f78
-	fi
716f78
-
716f78
 	if ocf_is_true "$OCF_RESKEY_ctdb_manages_samba" && [ ! -f "$OCF_RESKEY_smb_conf" ]; then
716f78
 		ocf_exit_reason "Samba config file '$OCF_RESKEY_smb_conf' does not exist."
716f78
 		return $OCF_ERR_INSTALLED