Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
01.03.2016 18:24, Lars Ellenberg wrote:
> On Mon, Feb 29, 2016 at 03:10:38PM +0000, Vladislav Bogdanov wrote:
>> Two debugging methods conflict with each other,
>> particularly it is impossible to trace drbd RA with trace_ra=1
>
> I don't see how that would conflict.
> If the "magic file" does not exist,
> the code you drop is inactive anyways.
ocf-shellfuncs:
ocf_trace_redirect_to_file() {
local dest=$1
if ocf_is_bash4; then
exec 9>$dest
BASH_XTRACEFD=9
else
exec 2>$dest
fi
}
drbd.ocf:
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
Note 'exec 9' lines.
So with bash 4 all trace_ra is forcibly redirected to /dev/null.
Best,
Vladislav
>
> Lars
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user
>