Skip to content

ssh: wait up to 5 minutes for the server to start - #6821

Merged
anton-107 merged 1 commit into
mainfrom
ssh-metadata-wait
Sep 24, 2026
Merged

anton-107 merged 1 commit into
mainfrom
ssh-metadata-wait

Conversation

@anton-107

Copy link
Copy Markdown
Contributor

Changes

Once the bootstrap task reaches RUNNING, ensureSSHServerIsRunning now waits up to 5 minutes for the server's metadata.json, up from 60 seconds (30 retries x 2s). The timeout and poll interval are now named constants. There's no flag or env override.

Why

A first-time bootstrap on a cold cluster regularly took longer than 60 seconds and failed with a server metadata error, while an immediate retry succeeded. The loop already returns early when the run terminates (runFailureIfTerminated), so the longer cap only applies while the run is still alive.

Tests

  • No new test, since this only changes a constant. The build and lint pass, and the existing experimental/ssh tests pass. TestSSHServerBootstrap fails locally on main too, because the local interpreter is Python 3.6.

This pull request and its description were written by Isaac.

After the bootstrap task reaches RUNNING, the client allowed only 60 seconds
(30 retries x 2s) for the server to write metadata.json. A first-time
bootstrap on a cold cluster regularly overran that and failed with a server
metadata error, while an immediate retry succeeded. The wait already ends
early when the run terminates, so the longer cap only applies while the
run is alive.

Co-authored-by: Isaac <no-reply@databricks.com>
@anton-107
anton-107 requested a review from a team as a code owner September 23, 2026 14:36
@anton-107
anton-107 requested review from rclarey and renaudhartert-db and removed request for renaudhartert-db September 23, 2026 14:36
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: c4244ae

Run: 35875640425

Env ✅​pass 🙈​skip Time
✅​ aws linux 276 15 8:07
✅​ aws windows 278 13 5:43
✅​ azure linux 275 15 6:52
✅​ azure windows 277 13 5:09
✅​ gcp linux 276 15 7:52
✅​ gcp windows 278 13 5:53
Top 3 slowest tests (at least 2 minutes):
duration env testname
4:15 aws windows TestAccept
3:33 azure windows TestAccept
3:23 gcp windows TestAccept

@anton-107
anton-107 added this pull request to the merge queue Sep 24, 2026
Merged via the queue into main with commit 8d64346 Sep 24, 2026
24 checks passed
@anton-107
anton-107 deleted the ssh-metadata-wait branch September 24, 2026 16:35
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 8d64346

Run: 36028473208

Env ❌​FAIL 🔄​flaky ✅​pass 🙈​skip Time
🔄​ aws linux 3 1685 1082 192:01
🔄​ aws windows 6 1583 1107 219:32
✅​ azure linux 1497 1133 158:38
✅​ azure windows 1398 1158 178:42
✅​ gcp linux 1483 1137 164:26
❌​ gcp windows 3 2 1379 1162 191:04
11 interesting tests: 8 flaky, 3 FAIL
Test Name aws linux aws windows gcp windows
❌​ TestAccept 🔄​f ✅​p ❌​F
🔄​ TestAccept/bundle/resources/clusters/resize-terminated-fallback/DATABRICKS_BUNDLE_ENGINE=direct/DMS= ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/resources/clusters/resize-terminated-fallback/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/resources/postgres_synced_tables/recreate 🔄​f 🔄​f 🙈​s
🔄​ TestAccept/bundle/resources/postgres_synced_tables/recreate/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true 🔄​f 🔄​f
🔄​ TestAccept/bundle/resources/quality_monitors/change_table_name ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/resources/quality_monitors/change_table_name/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true ✅​p 🔄​f ✅​p
❌​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name ✅​p ✅​p ❌​F
❌​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name/DATABRICKS_BUNDLE_ENGINE=direct/DMS= ✅​p ✅​p ❌​F
🔄​ TestFilerReadDir ✅​p ✅​p 🔄​f
🔄​ TestFilerReadDir/files ✅​p ✅​p 🔄​f
Top 50 slowest tests (at least 2 minutes):
duration env testname
12:19 gcp linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
11:27 gcp windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
10:39 gcp windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
10:35 gcp linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
10:35 azure windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
8:49 aws linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
8:47 gcp linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
8:45 gcp linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform/DMS=
8:22 gcp linux TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
8:05 aws windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
7:50 gcp windows TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
7:38 azure windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
7:35 aws linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
7:35 aws windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
7:24 gcp linux TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
7:23 aws windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
7:22 azure windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
7:21 aws linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform/DMS=
7:16 aws windows TestAccept/bundle/resources/clusters/deploy/data_security_mode/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
7:11 azure linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
7:09 gcp windows TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
7:07 gcp linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
7:04 aws linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
7:00 azure linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
6:59 aws windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
6:56 azure linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
6:55 gcp windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
6:54 gcp windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
6:35 azure linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
6:33 aws linux TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
6:32 gcp linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
6:21 azure linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform/DMS=
6:21 aws windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
6:19 aws linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
6:18 gcp linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
6:12 aws linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
5:51 azure windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
5:48 aws linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
5:38 azure windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
5:31 aws windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
5:29 azure linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
5:28 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform/DMS=
5:25 gcp windows TestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
5:24 gcp linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
5:17 aws linux TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform/DMS=
5:14 gcp windows TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
5:10 azure linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct/DMS=
5:04 aws linux TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true
4:57 aws windows TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform/DMS=
4:51 gcp linux TestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct/DMS=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants