k3s/pkg/kubelet
Kubernetes Submit Queue 046baee847
Merge pull request #63118 from vikaschoudhary16/start-stop-race
Automatic merge from submit-queue (batch tested with PRs 62951, 57460, 63118). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix device plugin re-registration

**What this PR does / why we need it**:
While registering a new endpoint, device manager copies all the devices from the old endpoint for the same resource and then it stops the old endpoint and starts the new endpoint.

There is no sync between stopping the old and starting the new. While stopping the old, manager marks devices(which are copied to new endpoint as well) as "Unhealthy".

In the endpoint.go, when after restart, plugin reports devices healthy, same health state (healthy) is found  in the endpoint database and endpoint module does not update manager database.

Solution in the PR is to mark devices as unhealthy before copying to new endpoint. 


**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #62773

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
/cc @jiayingz @vishh @RenaudWasTaken @derekwaynecarr
2018-04-25 02:01:56 -07:00
..
apis Fix qosReserved json tag (lowercase qos, instead of uppercase QOS) 2018-04-24 09:12:35 -07:00
cadvisor Remove rktnetes code 2018-03-27 09:29:35 -07:00
certificate When bootstrapping a client cert, store it with other client certs 2018-04-23 10:23:01 -04:00
checkpoint Make 'pod' package to use unified checkpointManager 2018-04-16 01:30:20 -04:00
checkpointmanager Make 'pod' package to use unified checkpointManager 2018-04-16 01:30:20 -04:00
client Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
cm Fix race between stopping old and starting new endpoint 2018-04-24 22:22:39 -04:00
config Make 'pod' package to use unified checkpointManager 2018-04-16 01:30:20 -04:00
configmap Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
container Merge pull request #62360 from yujuhong/purge_unused 2018-04-10 23:52:24 -07:00
custommetrics Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
dockershim dockershim/sandbox: clean up pod network even if SetUpPod() failed 2018-04-24 11:17:49 -05:00
envvars Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
events Improve messaging on resize 2018-01-29 15:07:51 -05:00
eviction refresh eviction interval periodically 2018-03-06 15:14:05 -08:00
images Promote LocalStorageCapacityIsolation feature to beta 2018-03-02 15:10:08 -08:00
kubeletconfig unpack dynamic kubelet config payloads to files 2018-04-19 09:18:53 -07:00
kuberuntime Merge pull request #58740 from YuxiJin-tobeyjin/add-ut-for-kuberuntime-gc 2018-04-19 12:27:19 -07:00
leaky
lifecycle Support cluster-level extended resources in kubelet and kube-scheduler 2018-02-27 17:25:30 -08:00
logs Generated code 2018-02-23 01:42:35 +00:00
metrics Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
mountpod Make 'pod' package to use unified checkpointManager 2018-04-16 01:30:20 -04:00
network Update bazel BUILD files 2018-04-11 09:26:02 -07:00
pleg Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
pod Make 'pod' package to use unified checkpointManager 2018-04-16 01:30:20 -04:00
preemption Delete in-tree support for NVIDIA GPUs. 2018-04-02 20:17:01 -07:00
prober reset resultRun to 0 on pod restart 2018-04-19 22:58:19 +08:00
qos Make a few code paths compile cleanly with 32-bit Go. 2018-02-27 13:53:32 -08:00
remote Replace "golang.org/x/net/context" with "context" 2018-03-22 20:57:14 +08:00
secret Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
server Expose kubelet health checks using new prometheus endpoint 2018-03-30 11:08:15 -07:00
stats Update bazel BUILD files 2018-04-11 09:26:02 -07:00
status Make 'pod' package to use unified checkpointManager 2018-04-16 01:30:20 -04:00
sysctl Update generated files. 2018-04-11 18:35:24 +02:00
types Merge pull request #61432 from filbranden/killrkt1 2018-03-29 11:46:19 -07:00
util Detect backsteps correctly in base path detection 2018-03-13 02:23:06 -04:00
volumemanager boring 2018-04-18 09:55:57 -07:00
winstats fix "make test" 2018-02-24 17:39:21 +08:00
BUILD Make 'pod' package to use unified checkpointManager 2018-04-16 01:30:20 -04:00
OWNERS
active_deadline.go
active_deadline_test.go
doc.go
kubelet.go Timeout on instances.NodeAddresses cloud provider request 2018-04-23 13:28:43 +02:00
kubelet_getters.go Fix issue with race condition during pod deletion 2018-03-15 15:35:37 -07:00
kubelet_getters_test.go
kubelet_network.go Move hairpin mode logic to dockershim 2018-04-11 09:21:17 -07:00
kubelet_network_test.go Move the kubelet network package down to dockershim 2018-04-11 09:25:56 -07:00
kubelet_node_status.go Merge pull request #62543 from ingvagabund/timeout-on-cloud-provider-request 2018-04-23 09:12:42 -07:00
kubelet_node_status_test.go Timeout on instances.NodeAddresses cloud provider request 2018-04-23 13:28:43 +02:00
kubelet_pods.go Add private mount propagation to API. 2018-04-12 13:57:54 +02:00
kubelet_pods_test.go Add private mount propagation to API. 2018-04-12 13:57:54 +02:00
kubelet_pods_windows_test.go Lock subPath volumes 2018-03-05 09:14:44 +01:00
kubelet_resources.go
kubelet_resources_test.go
kubelet_test.go Make 'pod' package to use unified checkpointManager 2018-04-16 01:30:20 -04:00
kubelet_volumes.go Fix issue with race condition during pod deletion 2018-03-15 15:35:37 -07:00
kubelet_volumes_test.go boring 2018-04-18 09:55:57 -07:00
oom_watcher.go
oom_watcher_test.go
pod_container_deletor.go Use range in loops; misc fixes 2018-03-29 22:55:25 +11:00
pod_container_deletor_test.go
pod_workers.go fixes document grammar 2018-02-20 10:38:41 -05:00
pod_workers_test.go
reason_cache.go
reason_cache_test.go
runonce.go fix todo:add function getFailContainer to report which containers failed the pod 2018-03-15 09:38:02 +08:00
runonce_test.go Make 'pod' package to use unified checkpointManager 2018-04-16 01:30:20 -04:00
runtime.go Remove setInitError. 2018-01-29 21:44:54 -08:00
util.go
volume_host.go Only count mounts that are from other pods 2018-04-19 15:40:51 -07:00