Skip to content

[BUG] Controller reconcile clobbers agent-written schedulingStatus on InferenceService #643

Closed

Description

@Defilan

Bug Description

The metal-agent writes status.schedulingStatus / status.schedulingMessage on an InferenceService when admission rejects it (InsufficientMemory, and MemoryCheckFailed since #641). The write succeeds, but the controller's reconcile loop subsequently updates the status without preserving those fields, so they read back empty almost immediately.

Steps to Reproduce

  1. Run the metal-agent with an InferenceService whose model cannot be sized (e.g. gated HF source, status.size "0")
  2. Admission refuses the service and writes schedulingStatus: MemoryCheckFailed (confirmed: no update error in agent logs)
  3. kubectl get isvc -o jsonpath='{.status.schedulingStatus}' returns empty

Expected Behavior

kubectl describe/get shows the scheduling rejection on the status until the condition clears, so an operator can see why a service "won't start" without reading agent logs.

Actual Behavior

Only the Kubernetes warning event survives (events do show MemoryCheckFailed correctly). The status fields are overwritten by the controller's next status update.

Environment

LLMKube Version: main (2026-06-10), observed live during #640 verification

GPU (if applicable):

  • Metal (Apple Silicon)

Additional Context

Likely fix direction: the controller should preserve agent-owned scheduling fields when building its status update (or both writers should move to server-side apply with distinct field managers). Affects the pre-existing InsufficientMemory path as well, so this is not a regression from #641.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions