{{ message }}
meta: make Oracle container startup fail fast instead of hanging - #18339
Draft
WikiRik wants to merge 2 commits into
Draft
meta: make Oracle container startup fail fast instead of hanging#18339WikiRik wants to merge 2 commits into
WikiRik wants to merge 2 commits into
Conversation
The Oracle healthcheck ran sqlplus without `-L`, so a rejected logon still exited 0 as soon as the listener was up. The container was reported healthy before the XEPDB1 pluggable database was registered with the listener, which the 30s sleep in start.sh papered over. start.sh then ran sqlplus with a TTY and without `-L`. When the logon failed with ORA-12514, sqlplus dropped into its interactive logon prompt and waited for input forever, hanging the CI job until the 6 hour job limit (see the oracle latest Node 22 job on #18324). - healthcheck: pipe a query into `sqlplus -L -S` so it only passes when a real logon to XEPDB1 through the listener succeeds; add a start_period so boot-time probe failures are not reported as unhealthy - start.sh: drop the TTY, add `-L` so a failed logon exits non-zero immediately, and remove the blind 30s sleep - privileges.sql: exit non-zero on the first SQL/OS error Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
4 tasks
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Pull Request Checklist
yarn testoryarn test-DIALECTpass with this change (including linting)?Description Of Change
The
oracle latest (Node 22)job on #18324 hung inyarn start-oracle-latestfor the full 6 hour job limit (job). Two defects compounded:sqlpluswithout-Land with no stdin. On a rejected logon sqlplus prompts for credentials, hits EOF and exits 0. The container flipped to healthy 12s after start, as soon as the listener answered, while theXEPDB1PDB was not registered yet (ORA-12514). Thesleep 30sinstart.shwas a band-aid for exactly this.docker exec -twithout-L. When the logon failed, sqlplus dropped into its interactive logon prompt on the allocated TTY and waited for input that never came.Changes
docker-compose.yml(latest + oldest): the healthcheck pipesselect 1 from dualintosqlplus -L -S, so it only passes when a real logon toXEPDB1through the listener succeeds. Timeout raised from 1s to 5s and astart_periodadded so boot-time probe failures are not reported asunhealthy.start.sh(latest + oldest): dropped the TTY, added-Lso a failed logon exits non-zero immediately, removed the blindsleep 30s. The oldest script now uses the same easy-connect string as latest.privileges.sql:whenever sqlerror/whenever oserrorso a failing statement exits non-zero instead of silently continuing.Verification (local, against the real images)
start.shexec, service not registeredtimeout 15)privileges.sqlwhen user existsORA-01920)gvenzl/oracle-free:23.26.1-slimgvenzl/oracle-xe:18-slim🤖 Generated with Claude Code
Other affected jobs
The same mechanism also explains the
oracle oldesthangs since #18291 landed: oracle oldest (Node 22) on #18292 (6h, last log lineORA-12514: TNS:listener does not currently know of service requested in connect descriptor), oracle oldest (Node 24) on #18170 (6h), and the twooracle oldestjobs on #18328 that were cancelled after 1h14m. Both flavours are fixed here.Not covered: oracle oldest (Node 22) on #18335 died with exit code 137 (SIGKILL) while sqlplus was starting, which looks like the runner running out of memory rather than a script problem.
Related: #18340 (retry image pulls), #18341 (db2 startup timeout).