kubernetes/pkg/kubelet
Swati Sehgal 7ac399c205 node: device-mgr: Handle recovery by checking if healthy devices exist
In case of node reboot/kubelet restart, the flow of events involves
obtaining the state from the checkpoint file followed by setting
the `healthDevices`/`unhealthyDevices` to its zero value. This is
done to allow the device plugin to re-register itself so that
capacity can be updated appropriately.

During the allocation phase, we need to check if the resources requested
by the pod have been registered AND healthy devices are present on
the node to be allocated.

Also we need to move this check above `needed==0` where needed is
required - devices allocated to the container (which is obtained from
the checkpoint file) because even in cases where no additional devices
have to be allocated (as they were pre-allocated), we still need to
make the devices that were previously allocated are healthy.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-06 11:52:23 +00:00
..
apis Add MaxParallelImagePulls support 2023-03-02 03:57:59 +00:00
cadvisor Merge pull request #114785 from TommyStarK/kubelet/replace-deprecated-pointer-function 2023-03-01 18:04:55 -08:00
certificate Merge pull request #114367 from liggitt/kubelet-csr-init 2023-01-30 09:07:05 -08:00
checkpointmanager
client kubelet/client: collapse transport wiring onto standard approach 2023-02-06 20:34:49 -05:00
cloudresource
cm node: device-mgr: Handle recovery by checking if healthy devices exist 2023-03-06 11:52:23 +00:00
config Merge pull request #112021 from mrunalp/test_host_path_pv_selinux_fix 2022-12-23 12:35:27 -08:00
configmap Generate and format files 2022-07-26 13:14:05 -04:00
container Merge pull request #116083 from SataQiu/clean-20230227 2023-03-06 02:22:58 -08:00
cri Merge pull request #115101 from HirazawaUi/delte-pkg-kubelet-unused-functions 2023-01-29 17:21:08 -08:00
envvars
events
eviction This commit contains the following: 2023-02-24 18:21:21 +00:00
images Add MaxParallelImagePulls support 2023-03-02 03:57:59 +00:00
kubeletconfig Merge pull request #115101 from HirazawaUi/delte-pkg-kubelet-unused-functions 2023-01-29 17:21:08 -08:00
kuberuntime Merge pull request #116083 from SataQiu/clean-20230227 2023-03-06 02:22:58 -08:00
leaky
lifecycle Fix indentation/spacing in comments to render correctly in godoc 2022-12-17 23:27:38 -05:00
logs Second attempt: Plumb context to Kubelet CRI calls (#113591) 2022-11-05 06:02:13 -07:00
metrics node: topology-mgr: add metric to measure topology mgr admission latency 2023-02-15 13:59:47 +00:00
network Skip failing Windows unit tests 2023-01-18 14:18:41 +02:00
nodeshutdown dependencies: update klog v2.90.1 2023-03-01 19:03:50 +01:00
nodestatus Second attempt: Plumb context to Kubelet CRI calls (#113591) 2022-11-05 06:02:13 -07:00
oom linux: fix kubelet start unit test 2022-11-09 07:17:05 +08:00
pleg This commit contains the following: 2023-02-24 18:21:21 +00:00
pluginmanager close grpc server in test file to avoid goroutine leak 2023-02-10 09:51:26 +08:00
pod kubelet: Replace deprecated pointer function 2023-01-08 13:44:09 +01:00
preemption feat: improve naming 2022-07-24 19:04:08 +09:00
prober GRPCContainerProbe is GA 2023-03-02 22:07:59 +00:00
qos In-place Pod Vertical Scaling - core implementation 2023-02-24 18:21:21 +00:00
runtimeclass kubelet: Replace deprecated pointer function 2023-01-08 13:44:09 +01:00
secret Generate and format files 2022-07-26 13:14:05 -04:00
server Merge pull request #114785 from TommyStarK/kubelet/replace-deprecated-pointer-function 2023-03-01 18:04:55 -08:00
stats *: Fix linter warnings 2023-02-07 13:01:41 +05:30
status In-place Pod Vertical Scaling - core implementation 2023-02-24 18:21:21 +00:00
sysctl impove the coverage 2023-02-01 10:47:38 +08:00
token Merge pull request #99685 from yangjunmyfm192085/run-test24 2022-05-03 17:16:47 -07:00
types Enable the feature into beta 2022-11-09 09:02:40 +01:00
util Merge pull request #115101 from HirazawaUi/delte-pkg-kubelet-unused-functions 2023-01-29 17:21:08 -08:00
volumemanager Merge pull request #111982 from cvvz/kubelet-del-unnecessary-code 2023-02-14 10:31:31 -08:00
winstats win: fix cpu count to calculate cpu_maximum 2022-12-14 13:56:31 +01:00
active_deadline_test.go Add comment for 0th case 2022-10-08 12:06:42 +03:00
active_deadline.go
doc.go
errors.go
kubelet_getters_test.go Add test case for getPodVolumeSubpathsDir 2022-04-27 16:33:28 +08:00
kubelet_getters.go Second attempt: Plumb context to Kubelet CRI calls (#113591) 2022-11-05 06:02:13 -07:00
kubelet_network_linux.go Add IPTablesOwnershipCleanup feature to disable kubelet iptables setup 2022-07-27 13:33:09 -04:00
kubelet_network_others.go
kubelet_network_test.go
kubelet_network.go Second attempt: Plumb context to Kubelet CRI calls (#113591) 2022-11-05 06:02:13 -07:00
kubelet_node_status_others.go
kubelet_node_status_test.go kubelet: Keep trying fast status update at startup until node is ready 2022-11-09 15:55:20 +00:00
kubelet_node_status_windows.go
kubelet_node_status.go kubelet: Keep trying fast status update at startup until node is ready 2022-11-09 15:55:20 +00:00
kubelet_pods_linux_test.go Promote Local storage capacity isolation feature to GA 2022-08-02 23:45:48 -07:00
kubelet_pods_test.go In-place Pod Vertical Scaling - core implementation 2023-02-24 18:21:21 +00:00
kubelet_pods_windows_test.go unittests: Fixes unit tests for Windows 2022-10-25 23:46:56 +03:00
kubelet_pods.go In-place Pod Vertical Scaling - core implementation 2023-02-24 18:21:21 +00:00
kubelet_resources_test.go
kubelet_resources.go
kubelet_test.go In-place Pod Vertical Scaling - core implementation 2023-02-24 18:21:21 +00:00
kubelet_volumes_linux_test.go Remove ioutil in kubelet and its tests 2022-07-30 12:35:26 +09:00
kubelet_volumes_test.go Upgrade CSIMigrationGCE feature gate to GA 2022-08-02 09:14:27 -07:00
kubelet_volumes.go remove ioutil in kubelet 2022-04-27 21:08:42 +08:00
kubelet.go update lease controller 2023-03-02 15:06:00 +01:00
OWNERS Check in OWNERS modified by update-yamlfmt.sh 2021-12-09 21:31:26 -05:00
pod_container_deletor_test.go
pod_container_deletor.go Second attempt: Plumb context to Kubelet CRI calls (#113591) 2022-11-05 06:02:13 -07:00
pod_workers_test.go Merge pull request #110071 from gjkim42/deflake-TestStaticPodExclusion 2022-07-29 13:17:43 -07:00
pod_workers.go grammar: replace all occurrences of "the the" with "the" 2022-10-14 09:03:14 +02:00
reason_cache_test.go
reason_cache.go Generate and format files 2022-07-26 13:14:05 -04:00
runonce_test.go In-place Pod Vertical Scaling - core implementation 2023-02-24 18:21:21 +00:00
runonce.go Second attempt: Plumb context to Kubelet CRI calls (#113591) 2022-11-05 06:02:13 -07:00
runtime.go
userns_manager_test.go kubelet: drop bitArray implementation 2022-08-19 16:55:15 +02:00
userns_manager.go kubelet: drop bitArray implementation 2022-08-19 16:55:15 +02:00
volume_host.go linux: fix kubelet start unit test 2022-11-09 07:17:05 +08:00