mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
ctdb-tools: Drop separate parallel+verbose stdout/stderr filtering
This has been broken for 10 years since commit
9616959bd6
, which introduced the
separate filtering. This commit was missing a redirect of the output
of stderr_filter() to stderr.
Since nobody depends on the separate filtering (i.e. nobody reported a
bug), just return to combining stdout and stderr, and filtering them
together.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
f3feb4df3a
commit
6478d65a2f
@ -269,24 +269,6 @@ push()
|
||||
done
|
||||
}
|
||||
|
||||
stdout_filter ()
|
||||
{
|
||||
if $verbose && $parallel ; then
|
||||
sed -e "s@^@[$n] @"
|
||||
else
|
||||
cat
|
||||
fi
|
||||
}
|
||||
|
||||
stderr_filter ()
|
||||
{
|
||||
if $verbose && $parallel ; then
|
||||
sed -e "s@^@[$n] @"
|
||||
else
|
||||
cat
|
||||
fi
|
||||
}
|
||||
|
||||
######################################################################
|
||||
|
||||
parse_options "$@"
|
||||
@ -331,21 +313,13 @@ retcode=0
|
||||
for n in $nodes ; do
|
||||
set -o pipefail 2>/dev/null
|
||||
|
||||
# The following code applies stdout_filter and stderr_filter to
|
||||
# the relevant streams. Both filters are at the end of pipes so
|
||||
# they read from stdin and (by default) write to stdout. To allow
|
||||
# the filters to operate independently, the output of
|
||||
# stdout_filter is sent to a temporary file descriptor (3), which
|
||||
# is redirected back to stdout at the outermost level.
|
||||
ssh_cmd="$ONNODE_SSH $ssh_opts $ONNODE_SSH_OPTS"
|
||||
if $parallel ; then
|
||||
{
|
||||
exec 3>&1
|
||||
{
|
||||
$ssh_cmd "$n" "$command" 3>&- |
|
||||
stdout_filter >&3
|
||||
} 2>&1 | stderr_filter
|
||||
} &
|
||||
if $verbose ; then
|
||||
$ssh_cmd "$n" "$command" 2>&1 | sed -e "s@^@[$n] @"
|
||||
else
|
||||
$ssh_cmd "$n" "$command"
|
||||
fi &
|
||||
pids="${pids} $!"
|
||||
else
|
||||
if $verbose ; then
|
||||
|
Loading…
Reference in New Issue
Block a user