Commit Graph

931 Commits

Author SHA1 Message Date
Elana Hashman
6af7eb6d49
Migrate missed log entries in kubelet
Co-Authored-By: pacoxu <paco.xu@daocloud.io>
2021-03-18 14:26:26 -07:00
Kubernetes Prow Robot
1d4777b798
Merge pull request #100163 from lala123912/kubelet_log_3
Migrate pkg/kubelet/cm/cpumanage/{topology/togit pology.go, policy_none.go, cpu_assignment.go} to structured logging
2021-03-16 15:57:08 -07:00
Kubernetes Prow Robot
1cd909606d
Merge pull request #100176 from pacoxu/structured-log-kubelet-last
Kubelet migration to structured logs: cpumanager/{cpu_manager.go\fake_cpu_manager.go\policy_static.go)
2021-03-16 14:50:31 -07:00
Kubernetes Prow Robot
f217f3c0f9
Merge pull request #100081 from utsavoza/ugo/issue-98976/10-03-2021
Migrate pkg/kubelet/cm/cgroup_manager_linux.go to structured logging
2021-03-16 14:50:22 -07:00
Kubernetes Prow Robot
21de277402
Merge pull request #100007 from utsavoza/ugo/issue-98976/09-03-2021
Migrate remaining pkg/kubelet/cm/ top level files to structured logging
2021-03-16 14:50:14 -07:00
Kubernetes Prow Robot
38fbecf0c8
Merge pull request #100001 from shiyajuan123/logs
migrate kubelet/cm/container logs to structured logging
2021-03-16 14:50:06 -07:00
Kubernetes Prow Robot
e5309efbdf
Merge pull request #99974 from knabben/sl-memorymanager
Migrate pkg/kubelet/cm/memorymanager to structured logging
2021-03-16 14:49:47 -07:00
Kubernetes Prow Robot
81a1a793a1
Merge pull request #99969 from knabben/sl-topologymanager
Migrate pkg/kubelet/cm/topologymanager to structure logging
2021-03-16 14:49:39 -07:00
Kubernetes Prow Robot
a951e877be
Merge pull request #99563 from jmguzik/migrate-cm-cpumanager-state-structured-logging
Migrate pkg/kubelet/cm/cpumanager/state to structured logging
2021-03-16 14:48:55 -07:00
Kubernetes Prow Robot
e082d84575
Merge pull request #100196 from ehashman/remains-of-logs
Migrate remaining logs to structured logging
2021-03-16 13:12:55 -07:00
pacoxu
8d24c8d0ab update structured log for cpumanager/cpu_manager.go 2021-03-16 09:40:53 +08:00
Amim Knabben
b078a4ff7a Memory manager structured logging 2021-03-15 15:51:19 -04:00
Elana Hashman
ee0bcac1d2
Migrate devicemanager/topology_hints.go to structured logs 2021-03-15 12:39:45 -07:00
lala123912
b247240ad7 Migrate pkg/kubelet/cm/cpumanage/{topology/topology.go, policy_none.go, cpu_assignment.go} to structured logging 2021-03-15 09:42:07 +08:00
Amim Knabben
c1d24c87bb Migrate devicemanager to structured logging 2021-03-14 11:57:06 -04:00
Utsav Oza
2f3a4ec9cb Migrate remaining files in pkg/kubelet to structured logging 2021-03-12 22:36:28 +05:30
pacoxu
9e024e839b update structured log for policy_static.go 2021-03-12 16:26:20 +08:00
pacoxu
4cf80f160d update structured log for fake_cpu_manager.go 2021-03-12 16:06:52 +08:00
Amim Knabben
95db61e37b Structured log for topologymanager 2021-03-11 20:50:14 -05:00
shiyajuan123
d344fc612e fix and update 2021-03-10 14:58:17 +08:00
shiyajuan123
9cee635494 fix and update 2021-03-10 14:29:03 +08:00
Kubernetes Prow Robot
770a9504ea
Merge pull request #95734 from fromanirh/podresources-concrete-resources-apis
podresources APIs: concrete resources apis: implement GetAllocatableResources
2021-03-09 14:29:04 -08:00
Utsav Oza
13513f9762 Migrate pkg/kubelet/cm/ top level files to structured logging 2021-03-09 23:15:24 +05:30
Francesco Romani
da55ef0b9a node: podresources: list devices without topology
It's legal for device plugins to not expose topology informations.
Previously, the code was just skipping these devices.
Review highlighted is better to report them anyway and let the
client application decide if they still want somehow to track them
or skip them entirely.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:37 +01:00
Francesco Romani
9c69db3f04 e2e: node: add tests for GetAllocatableResources
Add e2e tests for the new GetAllocatableResources API.
The tests are added in the `podresources_test` suite
created previously in this series.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:36 +01:00
Francesco Romani
8afdf4f146 node: podresources: translate types in cm
during the review, we convened that the manager types
(CPUSet, ResourceDeviceInstances) should not cross the
containermanager API boundary; thus, the ContainerManager layer
is the correct place to do the type conversion

We push back the type conversions from the podresources server
layer, fixing tests accordingly.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:36 +01:00
Francesco Romani
ad68f9588c node: podresources: make GetDevices() consistent
We want to make the return type of the GetDevices() method of the
podresources DevicesProvider interface consistent with
the newly added GetAllocatableDevices type.
This makes the code easier to read and reduces the coupling between
the podresourcesapi server and the devicemanager code.

No intended changes in behaviour, but the different return types
now requires some data massaging. Tests are updated accordingly.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:36 +01:00
Francesco Romani
6d33354e4c node: podresources: implement GetAllocatableResources API
Extend the podresources API implementing the GetAllocatableResources endpoint,
as specified in the KEPs:

https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2043-pod-resource-concrete-assigments
https://github.com/kubernetes/enhancements/pull/2404

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:36 +01:00
Francesco Romani
1375c5bdc7 node: podresources: make GetCPUs return cpuset
a upcoming patch wants to add GetAllocatableCPUs() returning a cpuset.
To make the code consistent and a bit more flexible, we change the
existing interface to also return a cpuset.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-03-09 13:13:36 +01:00
shiyajuan123
6b53f8c65d migrate kubelet/cm/container logs to structured logging 2021-03-09 18:27:54 +08:00
David Porter
904cb67267 Fixes after runc libcontainer and docker update
- libcontainer renamed
  `github.com/opencontainers/runc/libcontainer/configs` to
  `github.com/opencontainers/runc/libcontainer/devices` so use the new
  references

- Update `dockershim` `ContainerCreate` call after docker update to
  v20.10.2
2021-03-08 22:10:29 -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
Kubernetes Prow Robot
413ff6751b
Merge pull request #98365 from odinuge/cgroup-v2-systemd
Fix cgroup handling for systemd with cgroup v2
2021-03-04 14:40:34 -08:00
Kubernetes Prow Robot
ef44d39be0
Merge pull request #99464 from Nordix/master-fix
Number of sockets is assumed to be same as NUMA nodes in kubelet
2021-03-03 14:41:21 -08:00
Jakub Guzik
85d69cde82 Migrate pkg/kubelet/cm/cpumanager/state to structured logging
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-03 01:18:37 +01:00
Artyom Lukianov
95b2777204 memory manager: specify the container cpuset.memory during the creation
Set the container cpuset.memory during the creation and avoid an additional
call to the resources update of the container.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-03-02 17:01:46 +02:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Hanamantagoud
549b615439 Number of sockets is assumed to be same as NUMA nodes 2021-02-26 16:22:50 +05:30
Kubernetes Prow Robot
5a382b2d83
Merge pull request #96594 from b10s/fix-getcgroupsubsystemsv1
Fix the getCgroupSubsystemsV1() which uses only the latest record
2021-02-17 01:25:06 -08:00
Nikhita Raghunath
c3c45b9b8c *: move balajismaniam to emeritus_approvers 2021-02-16 10:55:47 +05:30
Odin Ugedal
124de526cb Fix cgroup handling for systemd with cgroup v2
This fixes issues where kubelet enforces qos and nodeAllocatable on the
worng hierarchy. Kublet will now create the files

/sys/fs/cgroup/kubepods/{burstable,besteffort,}/pod-xyz

when running with systemd as the driver, making it impossible to enforce
the limits on nodeAllocatable.
2021-02-12 10:44:38 +01:00
Kubernetes Prow Robot
d819199065
Merge pull request #97888 from pacoxu/fix/97565
check containerd as well as docker-containerd
2021-02-09 23:46:59 -08:00
Artyom Lukianov
102124464a memory manager: improve the reserved memory validation logic
We will have two layers of the validation.

- the first part of the validation logic will be implemented under the
`ValidateKubeletConfiguration` method
- the second one that requires knowledge about machine topology and
node allocatable resources will be implemented under the memory manager.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:02 +02:00
Artyom Lukianov
932134034c memory manager: update API constant to have camel case format
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:02 +02:00
Artyom Lukianov
e8ea461bfd memory manager: update all relevant part of code to use []MemoryReservation
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:01 +02:00
Artyom Lukianov
7561a0f96e memory manager: provide new flag var to parse reserved-memory parameter
The new flag will parse the `--reserved-memory` flag straight forward
to the []kubeletconfig.MemoryReservation variable instead of parsing
it to the middle map representation.

It gives us possibility to get rid of a lot of unneeded code and use the single
presentation for the reserved-memory.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:01 +02: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
d0089db2ec memory manager: remove unused variable under stateCheckpoint 2021-02-09 01:10:01 +02:00
Artyom Lukianov
ff2a110920 memory manager: provide the new type to contain resources for each NUMA node
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:00 +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