Skip to content

Commit d873654

Browse files
committed
Fix bug in call to callGetPreferredAllocationIfAvailable()
Previously, we were passing the variable 'devices' to this function, when we should have been passing 'allocated'. This bug crept in due to a variable name change that didn't propogate its way through the entire function. The tests added in the previous commit would have caught this.
1 parent d551ab1 commit d873654

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/kubelet/cm/devicemanager/manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ func (m *ManagerImpl) devicesToAllocate(podUID, contName, resource string, requi
730730

731731
// Then give the plugin the chance to influence the decision on any
732732
// remaining devices to allocate.
733-
preferred, err := m.callGetPreferredAllocationIfAvailable(podUID, contName, resource, available.Union(devices), devices, required)
733+
preferred, err := m.callGetPreferredAllocationIfAvailable(podUID, contName, resource, available.Union(allocated), allocated, required)
734734
if err != nil {
735735
return nil, err
736736
}

0 commit comments

Comments
 (0)