Skip to content

Add POST /self-check endpoint for on-demand transcoder health checks#3894

Open
Lazydayz137 wants to merge 1 commit intolivepeer:masterfrom
Lazydayz137:feat/1920-self-check-endpoint
Open

Add POST /self-check endpoint for on-demand transcoder health checks#3894
Lazydayz137 wants to merge 1 commit intolivepeer:masterfrom
Lazydayz137:feat/1920-self-check-endpoint

Conversation

@Lazydayz137
Copy link
Copy Markdown

What does this pull request do?

Adds an HTTP endpoint that re-runs the GPU transcoding capability test on demand, enabling Kubernetes liveness probes that detect stuck orchestrators.

Specific updates

  • Add TranscoderSelfCheck field to LivepeerNode struct
  • Capture GPU devices and transcoder factory in a closure at startup
  • Register POST /self-check on the CLI web server (port 7935)
  • Return 200 on pass, 503 with error details on failure
  • Usage: curl -X POST http://localhost:7935/self-check

How did you test each of these updates?

  • go test ./core/... ./server/... ./cmd/livepeer/starter/... all pass
  • go vet clean
  • gofmt clean

Does this pull request close any open issues?

Fixes #1920

Checklist

  • I have read the contribution guide
  • make and tests run successfully
  • Code is formatted with gofmt

Add an HTTP endpoint on the CLI port (default 7935) that triggers the
same GPU transcoding self-check that runs on startup. This allows K8s
operators to configure liveness probes that detect "stuck" orchestrators
where transcoding has silently broken.

The implementation:
- Stores a self-check closure on LivepeerNode at startup (captures the
  GPU devices and transcoder factory)
- Registers POST /self-check on the CLI web server
- Returns 200 on success, 503 on failure with error details
- Returns 503 with explanation if node has no hardware acceleration

Usage: curl -X POST http://localhost:7935/self-check

Fixes livepeer#1920

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the go Pull requests that update Go code label Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

add ability to trigger transcoder health-check from the CLI port

1 participant