fix: subtract VM allocations when counting placeable slots#891
Conversation
probeScheduler always used raw effectiveCapacity for slot counting, making running VMs invisible in usage = totalSlots - placeableSlots. The total probe correctly ignores allocations (empty-datacenter view), but the placeable probe must subtract hv.Status.Allocation so that each host's remaining capacity reflects slots still available after running VMs are accounted for.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR introduces a boolean flag to ChangesAllocation-aware capacity probing
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Test Coverage ReportTest Coverage 📊: 69.7% |
probeScheduler always used raw effectiveCapacity for slot counting, making running VMs invisible in usage = totalSlots - placeableSlots. The total probe correctly ignores allocations (empty-datacenter view), but the placeable probe must subtract hv.Status.Allocation so that each host's remaining capacity reflects slots still available after running VMs are accounted for.