From d44fed601d4e867cd2d282df5673753d2aefb0c9 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Wed, 18 Apr 2018 08:05:25 +1000 Subject: [PATCH] ctdb-tools: Avoid filtering stderr when onnode not running in parallel stderr_filter() only does anything useful when running in parallel (i.e. with the -p option). So, simplify the non-parallel case by not using stderr_filter(). As a side-effect, this fixes an issue introduced in commit 85a4375788d8ef8345ec390807f18299abdadb20 where local daemon tests would hang when trying to start daemons with VALGRIND set (to a valgrind command that does not use --log-file). This is because valgrind would keep stderr open for its output so the pipeline involving stderr_filter() would never complete. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/tools/onnode | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ctdb/tools/onnode b/ctdb/tools/onnode index c3ebfea7137..6104d615694 100755 --- a/ctdb/tools/onnode +++ b/ctdb/tools/onnode @@ -368,13 +368,8 @@ for n in $nodes ; do if $verbose ; then echo >&2 ; echo ">> NODE: $n <<" >&2 fi - { - exec 3>&1 - { - $ssh_cmd "$n" "$command" 3>&- | - stdout_filter >&3 - } 2>&1 | stderr_filter + $ssh_cmd "$n" "$command" | stdout_filter } || retcode=$? fi done -- 2.34.1