Fixed: bug #41964: --controlmaster not seems to reuse OpenSSH connections to the same host.

This commit is contained in:
Ole Tange 2014-03-27 03:02:18 +01:00
parent d6235b0cc3
commit 06d55fcec3
4 changed files with 15 additions and 4 deletions

2
README
View file

@ -84,7 +84,7 @@ Watch the intro video for a quick introduction:
https://www.youtube.com/playlist?list=PL284C9FF2488BC6D1 https://www.youtube.com/playlist?list=PL284C9FF2488BC6D1
Walk through the tutorial (man parallel_tutorial). You command line Walk through the tutorial (man parallel_tutorial). You command line
with love you for it. will love you for it.
When using programs that use GNU Parallel to process data for When using programs that use GNU Parallel to process data for
publication please cite: publication please cite:

View file

@ -185,6 +185,9 @@ cleanup();
if($Global::semaphore) { if($Global::semaphore) {
$sem->release(); $sem->release();
} }
for(keys %Global::sshmaster) {
kill 9, $_;
}
::debug("Halt\n"); ::debug("Halt\n");
if($opt::halt_on_error) { if($opt::halt_on_error) {
wait_and_exit($Global::halt_on_error_exitstatus); wait_and_exit($Global::halt_on_error_exitstatus);
@ -630,7 +633,7 @@ sub get_options_from_array {
sub parse_options { sub parse_options {
# Returns: N/A # Returns: N/A
# Defaults: # Defaults:
$Global::version = 20140323; $Global::version = 20140326;
$Global::progname = 'parallel'; $Global::progname = 'parallel';
$Global::infinity = 2**31; $Global::infinity = 2**31;
$Global::debug = 0; $Global::debug = 0;
@ -3825,7 +3828,7 @@ sub sshcommand_of_sshlogin {
$serverlogin = $self->{'string'}; $serverlogin = $self->{'string'};
# OpenSSH_3.6.1p2 gives 'tcgetattr: Invalid argument' with -tt # OpenSSH_3.6.1p2 gives 'tcgetattr: Invalid argument' with -tt
# 2>/dev/null to ignore "process_mux_new_session: tcgetattr: Invalid argument" # 2>/dev/null to ignore "process_mux_new_session: tcgetattr: Invalid argument"
my $master = "ssh -MTS $control_path $serverlogin sleep 1 2>/dev/null"; my $master = "ssh -MTS $control_path $serverlogin sleep 1000000000 2>/dev/null";
if(not $self->{'control_path'}{$control_path}++) { if(not $self->{'control_path'}{$control_path}++) {
# Master is not running for this control_path # Master is not running for this control_path
# Start it # Start it

View file

@ -4,7 +4,12 @@ rm -rf tmp
mkdir tmp mkdir tmp
cd tmp cd tmp
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | stdout parallel -j8 -k -L1 cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | stdout parallel -j6 -k -L1
echo '### bug #41964: --controlmaster not sems to reuse OpenSSH connections to the same host'
(parallel -S redhat9.tange.dk true ::: {1..20}; echo No --controlmaster - finish last) &
(parallel -M -S redhat9.tange.dk true ::: {1..20}; echo With --controlmaster - finish first) &
wait
echo '### bug #41805: Idea: propagate --env for parallel --number-of-cores' echo '### bug #41805: Idea: propagate --env for parallel --number-of-cores'
FOO=test_csh_filter parallel --filter-hosts --env FOO,PATH -S csh@lo env ::: "" |egrep 'FOO|PATH' FOO=test_csh_filter parallel --filter-hosts --env FOO,PATH -S csh@lo env ::: "" |egrep 'FOO|PATH'
FOO=test_csh parallel --env FOO,PATH -S csh@lo env ::: "" |egrep 'FOO|PATH' FOO=test_csh parallel --env FOO,PATH -S csh@lo env ::: "" |egrep 'FOO|PATH'

View file

@ -1,3 +1,6 @@
### bug #41964: --controlmaster not sems to reuse OpenSSH connections to the same host
With --controlmaster - finish first
No --controlmaster - finish last
### bug #41805: Idea: propagate --env for parallel --number-of-cores ### bug #41805: Idea: propagate --env for parallel --number-of-cores
FOO=test_csh_filter FOO=test_csh_filter
PATH=/home/tange/bin:/home/tange/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/sbin:/usr/sbin:/home/tange/terminals/data-import:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/home/tange/bin PATH=/home/tange/bin:/home/tange/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/sbin:/usr/sbin:/home/tange/terminals/data-import:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/home/tange/bin