Skip to content

[Feature][Rust Frontend] Add Shutdown control RPC - #59316

Merged
BugenZhao merged 5 commits into
vllm-project:mainfrom
JulienDarve:jdarve/grpc-shutdown-engine
Sep 30, 2026
Merged

BugenZhao merged 5 commits into
vllm-project:mainfrom
JulienDarve:jdarve/grpc-shutdown-engine

Conversation

@JulienDarve

Copy link
Copy Markdown
Contributor

Purpose

Add Control.Shutdown so a trusted sidecar can request a fresh managed engine when required cache-event replay history is unavailable.

Managed vllm-rs serve reuses its configured SIGTERM shutdown path. Frontend-only modes return FAILED_PRECONDITION. The response acknowledges acceptance; shutdown may close the connection before it arrives.

Bump vllm-proto to 0.5.0 because the generated Control trait gains a required method.

Upstream searches found no open PR adding a Shutdown or KillEngine gRPC method. Related #56886 covers discovery withdrawal grace and does not add a shutdown RPC.

AI assistance was used through OpenAI Codex.

Test Plan

  • cargo nextest run --manifest-path rust/Cargo.toml -p vllm-server -p vllm-cmd -E 'test(grpc::tests::) | binary(vllm-rs)'
  • cargo publish --manifest-path rust/proto/Cargo.toml --locked --dry-run --allow-dirty
  • Repository pre-commit hooks on all changed files.
  • Local Qwen3-0.6B serving and Shutdown smoke tests on an RTX 6000 Ada, with shutdown timeouts of 5 and 0 seconds.

Test Result

  • 114 gRPC and CLI tests passed; all 39 gRPC tests passed again after the protocol version bump.
  • Protocol packaging and pre-commit checks passed.
  • Both GPU runs generated a 16-token completion, accepted Shutdown, exited with code 0, and left no running engine subprocesses. The five-second run exercised the existing SIGKILL cleanup fallback.
  • All 39 gRPC tests passed after the RPC rename. GPU smoke tests ran before the rename; shutdown behavior is unchanged.
  • Model accuracy evaluation was not run; model execution code is unchanged.

Co-authored-by: Codex
Signed-off-by: Julien Darve <jdarve@NVIDIA.com>
Co-authored-by: Codex
Signed-off-by: Julien Darve <jdarve@NVIDIA.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify

mergify Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Documentation preview: https://vllm--59316.org.readthedocs.build/en/59316/

@mergify mergify Bot added documentation Improvements or additions to documentation rust labels Sep 29, 2026
@BugenZhao

Copy link
Copy Markdown
Member

[AUTOMATED] @codex review

Comment thread rust/proto/Cargo.toml Outdated
JulienDarve and others added 2 commits September 29, 2026 16:56
Co-authored-by: Codex
Signed-off-by: Julien Darve <jdarve@NVIDIA.com>
Replace the `serve_with_engine_shutdown` entry point and duplicated
`Option<CancellationToken>` with a `Config.manages_engine` flag, set only by
managed `vllm-rs serve` with local engines. Drop the misplaced online-serving
docs section and note the FAILED_PRECONDITION contract in control.proto.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>

@BugenZhao BugenZhao left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @JulienDarve the interface looks reasonable. Added a commit to simplify things a bit

@BugenZhao BugenZhao added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 30, 2026
@BugenZhao

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ @JulienDarve, CI is now available for this PR.

  • /ci run starts upstream CI; /amd-ci run starts AMD CI only.
  • Your branch must contain every commit currently on its upstream target branch. Merge or rebase onto the latest target branch, then rerun the command. Append --allow-stale to a run command to test an outdated branch at your own risk.
  • /ci retry retries failed jobs in the CI build for the current PR head. If the current head has no CI build, it starts a new CI build for the current head containing only jobs that failed in the latest earlier CI build for this PR.
  • /amd-ci retry retries failed jobs in AMD CI for the current PR head. Use /amd-ci run when the current head has no AMD CI build.
  • /ci cancel cancels scheduled or running CI builds for this PR branch; /amd-ci cancel does the same for AMD CI only.

@BugenZhao
BugenZhao enabled auto-merge (squash) September 30, 2026 12:04
@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #92128 for commit d7ee05465083.

@BugenZhao
BugenZhao merged commit f28a508 into vllm-project:main Sep 30, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ready ONLY add when PR is ready to merge/full CI is needed rust

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants