fix(builder): key GPU interface node selector by interface, not memory size#412
fix(builder): key GPU interface node selector by interface, not memory size#412neyy91 wants to merge 1 commit into
Conversation
…y size The interface node-selector requirement was built with gpu.MemorySize in the label key instead of gpu.Interface. The inventory operator publishes the node label as "<gpu>.interface.<interface>", so a workload requesting a specific GPU interface produced a selector that could never match and the pod would fail to schedule.
|
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)
WalkthroughA one-line bug fix in ChangesGPU Interface Node Selector Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) 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 |
What
The GPU
interfacenode-selector requirement incluster/kube/builder/workload.gowas built withgpu.MemorySizein the label key instead ofgpu.Interface:Why
The inventory operator publishes the node label as
<gpu>.interface.<interface>(operator/inventory/node-discovery.go, viainfo.Interface). Because the builder keyed the selector off the memory size instead, a workload requesting a specific GPU interface (e.g.pcie) produced a node-affinity requirement that can never match a real node label — so the pod fails to schedule.Testing
Added
Test_nodeSelectorsFromResources_GPUInterface: a GPU withmemory_size=80Gi,interface=pciemust yield a selector keyed...interface.pcie, and must NOT yield...interface.80Gi. Fails before the fix