Unverified Commit e7ec34c7 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #63229 from…

Merge pull request #63229 from vikaschoudhary16/automated-cherry-pick-of-#63118-upstream-release-1.10-1524807783 Automatic merge from submit-queue. cherry pick of #63118: Fix race between stopping old and starting new endpoint **What this PR does / why we need it**: Cherry pick of #63118 on release-1.10. #63118: Fix device plugin re-registration **Special notes for your reviewer**: **Release note**: ```release-note Fix issue where on re-registration of device plugin, `allocatable` was not getting updated. This issue makes devices invisible to the Kubelet if device plugin restarts. Only work-around, if this fix is not there, is to restart the kubelet and then start device plugin. ``` /cc @jiayingz
parents 083dc36e fbcf47c1
......@@ -338,6 +338,7 @@ func (m *ManagerImpl) addEndpoint(r *pluginapi.RegisterRequest) {
// to avoid potential orphaned devices upon re-registration
devices := make(map[string]pluginapi.Device)
for _, device := range old.getDevices() {
device.Health = pluginapi.Unhealthy
devices[device.ID] = device
}
existingDevs = devices
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment