Skip to content

Increase Hadoop container startup timeout and add a retry - #31007

Open
tbaeg wants to merge 2 commits into
trinodb:masterfrom
tbaeg:fix/hadoop-container-startup
Open

Increase Hadoop container startup timeout and add a retry#31007
tbaeg wants to merge 2 commits into
trinodb:masterfrom
tbaeg:fix/hadoop-container-startup

Conversation

@tbaeg

@tbaeg tbaeg commented Sep 4, 2026

Copy link
Copy Markdown
Member

Description

The Kerberos environments intermittently fail before any test runs, because the Hadoop
container never reaches readiness:

ContainerLaunchException: Container startup failed for image ghcr.io/trinodb/testing/hive3.1
Caused by: Timed out waiting for log output matching '.*success: socks-proxy entered RUNNING state.*'

Allow more time. HadoopContainer gave supervisord three minutes. GcsEnvironment and
AzureEnvironment already overrode that same wait for the same image with six and twelve
minutes, so three has been judged too short twice. This raises the default to six, matching
GcsEnvironment, whose override then duplicates it and is removed.

Retry once. Rerunning the failed job passes, so the failure is transient — #30611
records four occurrences since August, each cleared by a rerun. withStartupAttempts(2)
gets that recovery within the run: tryStart() stops the failed container before
rethrowing, so the second attempt starts clean. Verified locally that the second attempt
runs and leaves nothing behind.

Additional context and related issues

HadoopContainer is constructed in 25 places, so this affects every Hadoop-based product
test. Neither change alters behaviour when the container starts in time.

Two costs: a rerun lands on a fresh runner whereas an attempt retries on the same host, so
the retry will not cover every case the rerun evidence does; and a genuinely broken
environment now takes two full waits to report.

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

@tbaeg
tbaeg force-pushed the fix/hadoop-container-startup branch from a4ad45d to 7b7ee7b Compare September 4, 2026 20:59
Raise the default to six minutes and drop the GcsEnvironment override
that now duplicates it.
The container occasionally misses its readiness deadline on a loaded
runner and fails before any test runs, while rerunning the same job
passes. Testcontainers stops the failed container before retrying, so a
second attempt starts clean and recovers without a manual rerun.
@tbaeg tbaeg changed the title Allow more time for the Hadoop container to start Increase Hadoop container startup timeout and add a retry Sep 5, 2026
@tbaeg
tbaeg force-pushed the fix/hadoop-container-startup branch from 7b7ee7b to a55a181 Compare September 5, 2026 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants