@@ -232,7 +232,7 @@ function parse_machine(machine::AbstractString)
232
232
end
233
233
234
234
function launch_on_machine (manager:: SSHManager , machine:: AbstractString , cnt, params:: Dict , launched:: Array , launch_ntfy:: Condition )
235
- # @info "launch_on_machine"
235
+
236
236
shell = params[:shell ]
237
237
ssh = params[:ssh ]
238
238
dir = params[:dir ]
@@ -598,8 +598,9 @@ function connect(manager::ClusterManager, pid::Int, config::WorkerConfig)
598
598
# master connecting to workers
599
599
if config. io != = nothing
600
600
(bind_addr, port:: Int ) = read_worker_host_port (config. io)
601
- # @info "CONNECT W2 $bind_addr $port"
601
+ # @info "CONNECT W2 $bind_addr $port $(config.host) $(config.bind_addr) "
602
602
pubhost = something (config. host, bind_addr)
603
+ # @info "CONNECT W21 $pubhost"
603
604
config. host = pubhost
604
605
config. port = port
605
606
else
@@ -641,7 +642,7 @@ function connect(manager::ClusterManager, pid::Int, config::WorkerConfig)
641
642
release (sem)
642
643
end
643
644
else
644
- (s, bind_addr) = connect_to_worker (bind_addr, port)
645
+ (s, bind_addr) = connect_to_worker (#= bind_addr=# pubhost , port)
645
646
end
646
647
647
648
config. bind_addr = bind_addr
@@ -703,6 +704,9 @@ function bind_client_port(sock::TCPSocket, iptype)
703
704
end
704
705
705
706
function connect_to_worker (host:: AbstractString , port:: Integer )
707
+
708
+ # @info "--------- CONNECT TO WORKER $host $port"
709
+
706
710
# Avoid calling getaddrinfo if possible - involves a DNS lookup
707
711
# host may be a stringified ipv4 / ipv6 address or a dns name
708
712
bind_addr = nothing
@@ -714,7 +718,6 @@ function connect_to_worker(host::AbstractString, port::Integer)
714
718
715
719
716
720
iptype = typeof (bind_addr)
717
- # @info "connect_to_worker: $host $port $bind_addr $iptype"
718
721
sock = socket_reuse_port (iptype)
719
722
connect (sock, bind_addr, UInt16 (port))
720
723
723
726
724
727
725
728
function connect_to_worker_with_tunnel (host:: AbstractString , bind_addr:: AbstractString , port:: Integer , tunnel_user:: AbstractString , sshflags, multiplex)
729
+
730
+ # @info "++++++++ CONNECT TO WORKER WITH TUNNEL host=$host port=$port bind_addr=$bind_addr tunnel_user=$tunnel_user sshflags=$sshflags multiplex=$multiplex"
731
+
726
732
localport = ssh_tunnel (tunnel_user, host, bind_addr, UInt16 (port), sshflags, multiplex)
727
733
s = connect (" localhost" , localport)
728
734
forward = " $localport :$bind_addr :$port "
0 commit comments