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.
This commit is contained in:
Kevin Klues 2020-07-04 12:30:38 +00:00
parent d551ab1e78
commit d87365494a

View File

@ -730,7 +730,7 @@ func (m *ManagerImpl) devicesToAllocate(podUID, contName, resource string, requi
// Then give the plugin the chance to influence the decision on any
// remaining devices to allocate.
preferred, err := m.callGetPreferredAllocationIfAvailable(podUID, contName, resource, available.Union(devices), devices, required)
preferred, err := m.callGetPreferredAllocationIfAvailable(podUID, contName, resource, available.Union(allocated), allocated, required)
if err != nil {
return nil, err
}