Commit Graph

19 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
3036d107a0 Merge pull request #127074 from Tal-or/mm_fix_checkpoint_file_comparison
memorymanager: fix checkpoint file comparison
2024-11-04 02:13:27 +00:00
holder
6d7a1226d5 update the test case name
(cherry picked from commit de033352079c7d87417f88f073d6b7891e51e590)
2024-10-29 12:08:23 +02:00
holder
39726b119f fix: fix state validate error after memorymanager with static policy start
(cherry picked from commit b91951f847d0b159c9d8ef32688cc96489ac1884)
2024-10-29 12:08:16 +02:00
Talor Itzhak
c019114e41 memorymanager:unit-tests for isAffinityViolatingNUMAAllocations function
Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2024-07-11 17:05:23 +03:00
Talor Itzhak
37399c8d4f memorymanager: avoid violating NUMA node memory allocation rule
According to https://kubernetes.io/blog/2021/08/11/kubernetes-1-22-feature-memory-manager-moves-to-beta/#single-vs-cross-numa-node-allocation
and to the design introduce in the memory manager KEP: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager
the NUMA node can not have both single and cross NUMA node allocations.

There're cases when the chosen affinity hint does not align with the
rule above but the pod get admitted anyway.

The implications are incosistent admission/rejection behaviors from memory manager side.

In order to fix the issue, we should validate that the affinity hint
that has been chosen is not violating the above rule.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2024-07-11 17:04:42 +03:00
Gunju Kim
b4e5b868a8 Don't reuse memory of a restartable init container 2023-09-17 14:49:15 +09:00
Patrick Ohly
bc6c7fa912 logging: fix names of keys
The stricter checking with the upcoming logcheck v0.4.1 pointed out these names
which don't comply with our recommendations in
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#name-arguments.
2023-01-23 14:24:29 +01:00
Kubernetes Prow Robot
c91f9bdc60 Merge pull request #104689 from cynepco3hahue/memory_manager_restricted_policy_fix
kubelet: memory manager: fix preferred topology hints calculation
2021-10-05 06:47:08 -07:00
KeZhang
a629ceeb58 Fix initContainersReusableMemory delete bug 2021-09-15 10:04:49 +08:00
Artyom Lukianov
9ea9798759 kubelet: memory manager: fix topology preferred topology hints calculation
Prevent starting pods with resources satisfied by a single NUMA node on multiple NUMA nodes.
The code returned before it updated the minimal amount of NUMA nodes that can satisfy the container
requests.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-08-31 17:46:59 +03:00
Artyom Lukianov
bb6d5b1f95 memory manager: provide unittests for init containers re-use
- provide tests for static policy allocation, when init containers
requested memory bigger than the memory requested by app containers
- provide tests for static policy allocation, when init containers
requested memory smaller than the memory requested by app containers
- provide tests to verify that init containers removed from the state
file once the app container started

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-07-05 20:52:25 +03:00
Artyom Lukianov
960da7895c memory manager: remove init containers once app container started
Remove init containers from the state file once the app container started,
it will release the memory allocated for the init container and can intense
the density of containers on the NUMA node in cases when the memory allocated
for init containers is bigger than the memory allocated for app containers.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-07-05 20:52:25 +03:00
kikimo
9d2135f703 reuse fake topology manager 2021-06-02 01:35:00 +08:00
aheng-ch
ff7b94fa5a fix removing pods from podTopologyHints mapping 2021-05-10 19:44:15 +08:00
Krzysztof Gibuła
e46b280f96 Replace klog with with testing.T logging in pkg/kubelet tests 2021-03-07 23:10:02 +01:00
Artyom Lukianov
0fa5dd5532 memory manager: move the fakeTopologyManagerWithHint
Move the fakeTopologyManagerWithHint and all related methods
from the topology manager package to the memory manager static policy unittests.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:01 +02:00
Artyom Lukianov
a015e4163f memory manager: rename state structs and fields
The commit rename state structs and some fields under these structs.

- NodeMap -> NUMANodeMap
- NodeState -> NUMANodeState
- NUMANodeState.Nodes -> NUMANodesState.Cells

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:00 +02:00
Artyom Lukianov
f7845ed4e9 memory manager: provide memory manager static policy unittests
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:09:59 +02:00
Krzysztof Wiatrzyk
d7175a831c memory manager: adding Memory Manager component unit tests
Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2021-02-09 01:09:59 +02:00