Skip to content

Discard a failed interpreter launch so the next run relaunches - #5576

Open
zeotuan wants to merge 1 commit into
apache:masterfrom
zeotuan:fix-interpreter-launch-recovery
Open

zeotuan wants to merge 1 commit into
apache:masterfrom
zeotuan:fix-interpreter-launch-recovery

Conversation

@zeotuan

@zeotuan zeotuan commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What is this PR for?

ManagedInterpreterGroup.getOrCreateInterpreterProcess assigns the process handle before start(). When a launch fails (e.g. an interpreter pod rejected by a k8s namespace quota), the group keeps a handle that never ran, so every later paragraph fails with:

java.io.IOException: Interpreter process is not running
 current PodPhase: Unknown

until a full interpreter restart.

Change:

  • On start()/init() failure: stop the half-created process (cleans up orphan resources such as the scratch PVC and Service), drop the handle, rethrow.
  • Paragraph shows the real launch error; the next run relaunches.

Out of scope: a process that dies after a successful start (e.g. OOM-killed driver) still needs a restart.

Related: #5517 (open) leaves this case out of scope ("after a launch fails, the group keeps the failed process until the interpreter is restarted"). This PR covers it. The two are complementary: with #5517, the stop() here also ends a launch that is still in progress.

What type of PR is it?

Bug Fix

Todos

  • - Jira issue

What is the Jira issue?

  • TBD

How should this be tested?

ManagedInterpreterGroupTest.failedLaunchIsDiscardedSoTheNextRunLaunchesAgain (fails on unpatched source).

./mvnw package -pl zeppelin-server --am -Dtest=ManagedInterpreterGroupTest -Dsurefire.failIfNoSpecifiedTests=false

Screenshots (if appropriate)

N/A

Questions:

  • Does the license files need to update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

ManagedInterpreterGroup assigned the process handle before start(), so a launch
rejected (e.g. by a k8s namespace quota) left a handle that never ran and every
later paragraph failed with 'Interpreter process is not running' until a full
interpreter restart. On start()/init() failure, stop the half-created process,
drop the handle and rethrow.
@zeotuan zeotuan changed the title [ZEPPELIN-XXXX] Discard a failed interpreter launch so the next run relaunches Discard a failed interpreter launch so the next run relaunches Oct 20, 2026
@zeotuan
zeotuan marked this pull request as ready for review October 21, 2026 04:11

This branch has not been deployed

No deployments
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.

1 participant