Commit c0c29ed
committed
fix(scheduler): remove node from cache when node-selector label is removed
When using --node-selector in volcano scheduler, removing the matching
label from a node did not evict the node from the scheduler cache.
SyncNode() checked nodeCanAddCache() but only returned nil without
calling RemoveNode(), causing the scheduler to continue scheduling
pods to nodes that no longer match the selector.
Add RemoveNode() call when nodeCanAddCache() returns false, so the
node is properly evicted from cache when its labels no longer match
the configured node selector.
Signed-off-by: brick-pixel <brick-pixel@users.noreply.github.com>1 parent 2946de8 commit c0c29ed
File tree
2 files changed
+28
-0
lines changed- pkg/scheduler/cache
2 files changed
+28
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
621 | 621 | | |
622 | 622 | | |
623 | 623 | | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
624 | 629 | | |
625 | 630 | | |
626 | 631 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1573 | 1573 | | |
1574 | 1574 | | |
1575 | 1575 | | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
0 commit comments