File tree Expand file tree Collapse file tree
src/dstack/_internal/core/backends/kubernetes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import random
12import shlex
23import subprocess
34import tempfile
@@ -748,7 +749,7 @@ def _check_and_configure_jump_pod_service(
748749 "Failed to acquire an IP for jump pod automatically."
749750 " Specify proxy_jump.hostname for Kubernetes backend."
750751 )
751- jump_pod_hostname = cluster_external_ips [ 0 ]
752+ jump_pod_hostname = random . choice ( cluster_external_ips )
752753 logger .info (
753754 (
754755 "Jump pod %s is running on node %s which has no external IP,"
@@ -915,6 +916,10 @@ def _run_ssh_command(
915916 "none" ,
916917 "-o" ,
917918 "StrictHostKeyChecking=no" ,
919+ "-o" ,
920+ # The same timeout as in core.services.ssh.tunnel.SSH_DEFAULT_OPTIONS,
921+ # which is used, for example, by server.services.runner.ssh.runner_ssh_tunnel()
922+ "ConnectTimeout=3" ,
918923 "-i" ,
919924 f .name ,
920925 "-p" ,
You can’t perform that action at this time.
0 commit comments