[DRBD-user] [PATCH 4/4] drbd.ocf: Remove RA debugging code in favor of trace_ra=1

Vladislav Bogdanov bubble at hoster-ok.com
Mon Feb 29 16:10:38 CET 2016

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Two debugging methods conflict with each other,
particularly it is impossible to trace drbd RA with trace_ra=1
---
 scripts/drbd.ocf |   32 --------------------------------
 1 files changed, 0 insertions(+), 32 deletions(-)

diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf
index b6e865f..bc57764 100755
--- a/scripts/drbd.ocf
+++ b/scripts/drbd.ocf
@@ -115,33 +115,6 @@ OCF_RESKEY_stop_outdates_secondary_default="false"
 : ${OCF_RESKEY_CRM_meta_master_max=1}
 : ${OCF_RESKEY_CRM_meta_master_node_max=1}
 #######################################################################
-# for debugging this RA
-DEBUG_LOG_DIR=/tmp/drbd.ocf.ra.debug
-DEBUG_LOG=$DEBUG_LOG_DIR/log
-USE_DEBUG_LOG=false
-ls_stat_is_dir_0700_root() {
-	set -- $(command ls -ldn "$1" 2>/dev/null);
-	case "$1/$3" in
-	drwx?-??-?/0|\
-	drwx?-??-?./0)	true ;;
-	*)	false ;;
-	esac
-}
-# try to avoid symlink vuln.
-if ls_stat_is_dir_0700_root $DEBUG_LOG_DIR &&
-   [[ -w "$DEBUG_LOG" && ! -L "$DEBUG_LOG" ]]
-then
-	USE_DEBUG_LOG=true
-	# PS4='+[`date +%F\ %T.%3N`] '
-	exec 9>>"$DEBUG_LOG"
-	date >&9
-	echo "$*" >&9
-	env | grep OCF_ | sort >&9
-else
-	exec 9>/dev/null
-fi
-# end of debugging aid
-#######################################################################
 
 meta_data() {
 	cat <<END
@@ -1199,11 +1172,6 @@ usage)
 	exit $OCF_SUCCESS
 esac
 
-if $USE_DEBUG_LOG ; then
-	exec 2>&9
-	set -x
-fi
-
 # Everything except usage and meta-data must pass the validate test
 drbd_validate_all || exit
 
-- 
1.7.1




More information about the drbd-user mailing list