kubernetes/pkg/kubelet/cm/cpumanager
Kevin Klues 00df26a985 Fix a bug whereby reusable CPUs and devices were not being honored
Previously, it was possible for reusable CPUs and reusable devices (i.e.
those previously consumed by init containers) to not be reused by
subsequent init containers or app containers if the TopologyManager was
enabled. This would happen because hint generation for the
TopologyManager was not considering the reusable devices when it made
its hint calculation.

As such, it would sometimes:
1) Generate a hint for a differnent NUMA node, causing the CPUs and
devices to be allocated from that node instead of the one where the
reusable devices live; or
2) End up thinking there were not enough CPUs or devices to allocate and
throw a TopologyAffinity admission error

This patch fixes this by ensuring that reusable CPUs and devices are
considered as part of TopologyHint generation. This frunctionality is
difficult to unit test since it spans multiple components, but an e2e
test will be added in a subsequent patch to test this functionality.
2020-07-20 11:41:13 +00:00
..
state Run hack/update-vendor.sh 2020-05-16 07:54:33 -04:00
topology Run hack/update-vendor.sh 2020-05-16 07:54:33 -04:00
BUILD Run hack/update-vendor.sh 2020-05-16 07:54:33 -04:00
cpu_assignment_test.go kubelet/cm: fix test description 2019-03-07 21:23:15 +02:00
cpu_assignment.go switch over k/k to use klog v2 2020-05-16 07:54:27 -04:00
cpu_manager_test.go Merge pull request #90377 from cbf123/container_cpuset_fixup_2 2020-04-27 13:40:04 -07:00
cpu_manager.go switch over k/k to use klog v2 2020-05-16 07:54:27 -04:00
fake_cpu_manager.go switch over k/k to use klog v2 2020-05-16 07:54:27 -04:00
OWNERS add sjenning as kubelet approver 2020-06-19 13:00:55 -05:00
policy_none_test.go CPU Manager - Rename policy.AddContainer() to policy.Allocate() 2020-02-27 07:24:33 +00:00
policy_none.go switch over k/k to use klog v2 2020-05-16 07:54:27 -04:00
policy_static_test.go Update strategy used to reuse CPUs from init containers in CPUManager 2020-04-23 20:27:43 +00:00
policy_static.go Fix a bug whereby reusable CPUs and devices were not being honored 2020-07-20 11:41:13 +00:00
policy_test.go Update CPUManager to include NUMANodeID in CPUTopology 2019-08-27 16:51:05 -05:00
policy.go CPU Manager - Rename policy.AddContainer() to policy.Allocate() 2020-02-27 07:24:33 +00:00
topology_hints_test.go Update TopologyManager.GetTopologyHints() to take pointers 2020-02-03 17:13:28 +00:00