Skip to content

feat: add node reconciler, allow to schedule to group of nodes, min/max autoscaler - #9186

Merged
mudler merged 4 commits into
masterfrom
feat/scheduling
Mar 31, 2026
Merged

feat: add node reconciler, allow to schedule to group of nodes, min/max autoscaler#9186
mudler merged 4 commits into
masterfrom
feat/scheduling

Conversation

@mudler

@mudler mudler commented Mar 30, 2026

Copy link
Copy Markdown
Owner

This PR:

  • drops parallel setting - always enabled now. gRPC backends queue automatically, so it's left to the backends to support parallel jobs
  • Add model reconciler with max/min replica count. Users can specify now per-model specific settings for how many replicas have to be in the same cluster
  • Adds node labels to pin models to specific nodes

mudler added 4 commits March 30, 2026 20:49
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
…ax autoscaler

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
@mudler
mudler merged commit 8862e3c into master Mar 31, 2026
35 checks passed
@mudler
mudler deleted the feat/scheduling branch March 31, 2026 06:28
@mudler mudler added the enhancement New feature or request label Apr 1, 2026
mudler added a commit that referenced this pull request Apr 27, 2026
…ster

The register endpoint called SetNodeLabels(req.Labels) — replace-all
semantics — so every worker re-register wiped every label not in the
worker's body. The bug existed since labels were introduced in
PR #9186 (Mar 31), but only triggered for workers that supplied
labels via --node-labels.

PR #9583 (the multi-replica refactor) added an auto-mirrored
`node.replica-slots` label to every worker's registration body, which
made `len(req.Labels) > 0` always true — turning a latent edge-case
bug into a universal one. Operators reported "labels assigned to
node do not persist": labels survived until the next worker restart,
then disappeared.

Fix: iterate req.Labels and call SetNodeLabel (upsert) for each
instead of SetNodeLabels (delete-then-recreate). Worker-managed
labels still refresh on re-register; UI-added labels survive.

Trade-off: an operator who removes a label from --node-labels won't
have it auto-removed from the DB on next register — they can clean it
via the UI. Acceptable, since the alternative (current behavior)
silently destroys operator state.

Regression test added first (TDD): RegisterNodeEndpoint registers a
node, the test simulates a UI add via SetNodeLabel, then re-registers
with a different worker label set; assertion that the UI-added label
survives. Test fails against the broken code, passes against the fix.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Assisted-by: claude-code:opus-4-7 [Edit] [Bash]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant