From 7db37dccaf511fbe17ce2d96d32c83e9aaea0983 Mon Sep 17 00:00:00 2001 From: Christopher Maher Date: Thu, 9 Jul 2026 15:44:50 -0700 Subject: [PATCH] fix(controller): drop invalid --enable-metrics flag from vLLM runtime vLLM has no --enable-metrics flag; its OpenAI server always exposes Prometheus metrics at /metrics. Emitting the flag makes vLLM's argument parser reject the whole command, so every vLLM InferenceService pod fails to start with 'unrecognized arguments: --enable-metrics'. Remove it; the PodMonitor already scrapes /metrics unconditionally. The prior unit test asserted the bad flag was present, so the suite stayed green while the runtime was broken. Flip it to assert the flag is absent so the regression cannot return. Fixes #1030 Signed-off-by: Christopher Maher --- .../controller/inferenceservice_deployment_test.go | 11 ++++++----- internal/controller/runtime_vllm.go | 5 ++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/internal/controller/inferenceservice_deployment_test.go b/internal/controller/inferenceservice_deployment_test.go index c2c35aea..57b87110 100644 --- a/internal/controller/inferenceservice_deployment_test.go +++ b/internal/controller/inferenceservice_deployment_test.go @@ -3662,11 +3662,12 @@ var _ = Describe("RuntimeBackend interface", func() { Expect(args).NotTo(ContainElement("--model")) Expect(args).To(ContainElements("--host", "::")) Expect(args).To(ContainElements("--port", "8000")) - // --enable-metrics is always set so vLLM pods expose /metrics for - // PodMonitor scraping (#409). - Expect(args).To(ContainElement("--enable-metrics")) - // Six elements: --host :: --port 8000 --enable-metrics. - Expect(args).To(HaveLen(6)) + // vLLM has no --enable-metrics flag; it always exposes /metrics. + // Emitting the flag makes vLLM reject the command and the pod never + // starts (#1030), so it must never appear. + Expect(args).NotTo(ContainElement("--enable-metrics")) + // Five elements: --host :: --port 8000. + Expect(args).To(HaveLen(5)) }) It("should append extraArgs after typed flags", func() { diff --git a/internal/controller/runtime_vllm.go b/internal/controller/runtime_vllm.go index 618cb81c..0b6b0ac5 100644 --- a/internal/controller/runtime_vllm.go +++ b/internal/controller/runtime_vllm.go @@ -73,8 +73,11 @@ func (b *VLLMBackend) BuildArgs(isvc *inferencev1alpha1.InferenceService, model // which are appended last so the user flag wins. "--host", "::", "--port", fmt.Sprintf("%d", port), - "--enable-metrics", } + // NOTE: vLLM has no --enable-metrics flag. Its OpenAI server always exposes + // Prometheus metrics at /metrics, so there is nothing to enable; passing the + // flag makes vLLM's argument parser reject the whole command and the pod + // never starts (#1030). The PodMonitor scrapes /metrics unconditionally. var err error