Commit Graph

9396 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
4e7fc6df63 Merge pull request #100369 from wzshiming/fix/restart-dbus-for-graceful-node-shutdown
After DBus restarts, make GracefulNodeShutdown work again
2021-06-14 20:50:00 -07:00
Kubernetes Prow Robot
85f0931ab9 Merge pull request #102772 from saintube/patch-1
cleanup: fix kubelet cpuset typo
2021-06-14 19:00:13 -07:00
Francesco Romani
369416b763 cm: handle nil cpumanager avoiding segfault
If the cpumanager feature gate is disabled, the corresponsing field
of the containerManager will be nil.
A couple functions don't check for this occurrence and happily
deference the pointer unconditionally, leading to possible segfaults.

The relevant functions were introduced to support the podresources API,
so to trigger this segfault all the following are needed:
- cpumanager feature gate has to be disabled explicitely
- any podresources API must be called

Worth pointing out that when the new functions were introduced (around
kubernetes 1.20) the default feature gate for cpumanager was already set
to true, hence this bug is expected to be triggered rarely.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-06-10 16:22:43 +02:00
Frame
9255f2ccf3 Fix kubelet cpuset typo 2021-06-10 18:17:04 +08:00
Kubernetes Prow Robot
f7cff077d5 Merge pull request #102611 from ehashman/test-order
kubelet: Fix test order in verifyContainerStatuses
2021-06-08 00:29:11 -07:00
Kubernetes Prow Robot
db34c5a869 Merge pull request #102471 from wzshiming/clean/cap
Pre-allocated memory
2021-06-07 19:55:12 -07:00
Kubernetes Prow Robot
bd0196e8ba Merge pull request #102568 from ehashman/init-container-coverage
Add unit test coverage for init container phases
2021-06-07 09:46:55 -07:00
Elana Hashman
cc2e9394be kubelet: Fix test order in verifyContainerStatuses
Per https://pkg.go.dev/github.com/stretchr/testify/assert#Equal
expected goes before actual.
2021-06-04 16:04:10 -07:00
Kubernetes Prow Robot
9f7c9c322f Merge pull request #101738 from matthyx/deflake-startupprobe
fix manual trigger of readinessProbe on startupProbe success
2021-06-03 14:34:42 -07:00
Elana Hashman
dfd67c7d79 Add unit test coverage for init container phases 2021-06-02 17:37:51 -07:00
Kubernetes Prow Robot
4eda493658 Merge pull request #101959 from lunhuijie/run-test5
Add test cases to the LoadClientConfig function
2021-06-02 13:42:55 -07:00
Kubernetes Prow Robot
4d50f2ace0 Merge pull request #101633 from llhuii/kubelet/remove-redundant-code
kubelet_pods.go: clean makeEnvironmentVariables
2021-06-02 13:42:43 -07:00
刁浩 10284789
ce08fd5976 Add test cases to the LoadClientConfig function
Signed-off-by: 刁浩 10284789 <diao.hao@zte.com.cn>
2021-06-02 15:22:00 +00:00
Kubernetes Prow Robot
1795a98eeb Merge pull request #102221 from kikimo/add-hint-to-fake-topology-manager
Add hint to fake topology manager.
2021-06-02 03:40:05 -07:00
kikimo
86d68effc2 clean code 2021-06-02 09:07:53 +08:00
Kubernetes Prow Robot
38b94683c9 Merge pull request #101559 from njuptlzf/fsstore_test
Clean up tempDir after fsstore_test.go is executed
2021-06-01 16:02:07 -07:00
Kubernetes Prow Robot
7c7a0865cd Merge pull request #102218 from kolyshkin/cgroup-cleanups
pkg/kubelet/cm: cgroup-related cleanups
2021-06-01 13:45:51 -07:00
Kubernetes Prow Robot
e5b54d0769 Merge pull request #102232 from MadhavJivrajani/mirror-client-log-line-fix
Change log line to print actual pod uid and not address of the pod uid
2021-06-01 10:51:52 -07:00
kikimo
9d2135f703 reuse fake topology manager 2021-06-02 01:35:00 +08:00
kikimo
8b3162d67b clean code 2021-06-02 01:17:04 +08:00
Shiming Zhang
582b492cc0 Pre-allocated memory 2021-06-01 15:19:44 +08:00
Kubernetes Prow Robot
49897ca156 Merge pull request #102268 from sanwishe/loggingformat1
cleanup: Optimization logging format for pkg/kubelet
2021-05-28 07:50:25 -07:00
njuptlzf
6738380a80 cleanup tempDir after fsstore_test.go 2021-05-27 10:10:08 +08:00
Gunju Kim
6317ce63c6 Add feature gate ExpandedDNSConfig
ExpandedDNSConfig allows kubernetes to have expanded DNS(Domain Name
System) configuration
2021-05-27 07:10:13 +09:00
Gunju Kim
819059f641 kubelet: Validate the length of the DNS search path 2021-05-27 07:09:46 +09:00
Madhav Jivrajani
d7a67a3b8e change log line to print actual pod uid instead of address of the pod uid
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2021-05-26 20:32:32 +05:30
Kubernetes Prow Robot
91656fa6eb Merge pull request #101308 from pacoxu/doc-kubelet-running-pods
kubelet_running_pods shows number of pods that have a running pod sandbox
2021-05-26 03:17:20 -07:00
Sascha Grunert
b167fc24d7 Update pause image to v3.5
Update dependencies and the test images to use pause 3.5. We also
provide a changelog entry for the new container image version.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-05-25 09:04:46 +02:00
Kubernetes Prow Robot
13cafd5cb0 Merge pull request #101480 from yuzhiquan/little-nit-for-kubelet
Fix some nit for kubelet
2021-05-24 21:49:05 -07:00
Kubernetes Prow Robot
a49b4a1018 Merge pull request #100608 from pacoxu/fix/poststart-hook
correct messages in post start hook error handling
2021-05-24 21:48:32 -07:00
Kubernetes Prow Robot
63014d87cd Merge pull request #101013 from pacoxu/mac-ut/skips
skip some UT on mac for dockershim
2021-05-24 20:10:20 -07:00
sanwishe
9e257ec194 Optimization logging format for pkg/kubelet
Signed-off-by: sanwishe <jiang.mingzhi35@zte.com.cn>
2021-05-25 08:52:08 +08:00
Kubernetes Prow Robot
f545438bd3 Merge pull request #101587 from nixpanic/in-tree/block-metrics
Fix a panic for in-tree drivers that partialy support Block volume metrics
2021-05-24 16:18:47 -07:00
Kubernetes Prow Robot
88c0e8968b Merge pull request #99680 from CaoDonghui123/fixissues4
fix error of setting  negative value for containerLogMaxSize
2021-05-24 16:18:20 -07:00
Kubernetes Prow Robot
cf59c68e15 Merge pull request #102088 from wzshiming/fix/pod-devices-has-pod-lock
Add the missing RLock
2021-05-24 15:16:20 -07:00
Kir Kolyshkin
f1aee7e049 kubelet/cm: GetResourceStats -> MemoryUsage
Commit cc50aa9dfb introduced GetResourceStats, a method which collected
all the statistics from various cgroup controllers, only to discard all
of the info collected except a single value (memory usage).

While one may argue that this method can potentially be used from other
places, this did not happen since it was added 4+ years ago.

Let's streamline this code and only collect what we need, i.e. memory
usage. Rename the method accordingly.

While at it, fix pkg/kubelet/cm/cgroup_manager_unsupported.go to not
instantiate a new error every time a method is called.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-05-23 20:43:52 -07:00
Shiming Zhang
202a012093 Add restart unit test 2021-05-23 00:47:36 +08:00
kikimo
20c02357ca Add hint to fake topology manager. 2021-05-22 15:29:08 +08:00
Kubernetes Prow Robot
a2357f4516 Merge pull request #100136 from Danil-Grigorev/disable-cloud-providers-fg
Add feature gate to disable all in-tree cloud providers
2021-05-21 15:39:36 -07:00
Kir Kolyshkin
c299b8fc9a kubelet/cm: rm propagateControllers
This was added by commit a9772b2290.

In the current codebase, the cgroup being updated was created using
runc/opencontainers' manager.Apply(), which already does controllers
propagation, so there is no need to repeat that on every update.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-05-21 13:44:54 -07:00
Kubernetes Prow Robot
cb1775c73a Merge pull request #101893 from kikimo/fix-numa-topo-error
Avoid undesirable allocation when device is associated with multiple …
2021-05-21 08:40:47 -07:00
Danil-Grigorev
5d57b3794c Add DisableCloudProviders FG
FeatureGate acts as a secondary switch to disable cloud-controller loops
in KCM, Kubelet and KAPI.

Provide comprehensive logging information to users, so they will be
guided in adoption of out-of-tree cloud provider implementation.
2021-05-21 16:09:44 +02:00
Kubernetes Prow Robot
5de1a754c8 Merge pull request #102147 from kolyshkin/update-runc-rc94-take-II
vendor: bump runc to rc95
2021-05-20 17:16:56 -07:00
Kubernetes Prow Robot
823d870725 Merge pull request #102014 from klueska/upstream-update-cpu-asssignment-algorithm
Refactor the algorithm used to decide CPU assignments in the CPUManager
2021-05-20 16:10:56 -07:00
Kubernetes Prow Robot
e259943f7f Merge pull request #101265 from s-ito-ts/ut_kubelet_topology
Adds unit tests for pkg/kubelet/cm/cpumanager/topology
2021-05-20 14:16:28 -07:00
Kubernetes Prow Robot
6e4e32985a Merge pull request #99576 from marosset/windows-host-process-work
Windows host process work
2021-05-20 14:16:15 -07:00
Niels de Vos
b997e0e4d6 Add SupportsMetrics() for Block-mode volumes
Volumes that are provisioned with `VolumeMode: Block` often have a
MetrucsProvider interface declared in their type. However, the
MetricsProvider should implement a GetMetrics() function. In the cases
where the storage drivers do not implement GetMetrics(), a panic can
occur.

Usual type-assertions are not sufficient in this case. All assertions
assume the interface is present. There is no straight forward way to
verify that a valid GetMetrics() function is provided.

By adding SupportsMetrics(), storage driver implementations require
careful reviewing for metrics support.
2021-05-20 17:10:23 +02:00
kikimo
c0a7939cbb remove redundant test branch in sorting algorithm 2021-05-20 20:31:47 +08:00
Rancho Chen
9469ee7025 Add testcase for freeCPUs with three Sockets 2021-05-20 11:49:51 +00:00
pacoxu
75c19da843 correct messages in post start hook error handling
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-05-20 15:14:47 +08:00