e5d55c04
refactor: an unconfigured host needs no special case
a73x 2026-08-23 11:13
Commit message
internal/agent/reconcile/reconcile.go
| Old | New | ||
|---|---|---|---|
| @@ -574,9 +574,6 @@ func (e *Engine) SeedLedger(recs map[string]state.Record) { | |||
| 574 | // (excluding vmID itself, so a retry does not double-count) and adds spec's | 574 | // (excluding vmID itself, so a retry does not double-count) and adds spec's |
| 575 | // request. | 575 | // request. |
| 576 | func (e *Engine) quotaCheckLocked(vmID string, spec state.VMSpec) string { | 576 | func (e *Engine) quotaCheckLocked(vmID string, spec state.VMSpec) string { |
| 577 | if e.MaxVCPUs == 0 && e.MaxMemMB == 0 && e.MaxDiskGB == 0 { | ||
| 578 | return "" // no caps configured — unlimited | ||
| 579 | } | ||
| 580 | vcpus, mem, disk := spec.VCPUs, spec.MemMB, spec.DiskGB | 577 | vcpus, mem, disk := spec.VCPUs, spec.MemMB, spec.DiskGB |
| 581 | for id, s := range e.committed { | 578 | for id, s := range e.committed { |
| 582 | if id == vmID { | 579 | if id == vmID { |