mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-03 02:07:38 +00:00
Merge pull request #121494 from aojea/fix/flake-unit-test
Fix/flake TestNewManagerImplStartProbeMode unit test
This commit is contained in:
@@ -236,12 +236,12 @@ func (m *ManagerImpl) PluginDisconnected(resourceName string) {
|
|||||||
m.mutex.Lock()
|
m.mutex.Lock()
|
||||||
defer m.mutex.Unlock()
|
defer m.mutex.Unlock()
|
||||||
|
|
||||||
if _, exists := m.endpoints[resourceName]; exists {
|
if ep, exists := m.endpoints[resourceName]; exists {
|
||||||
m.markResourceUnhealthy(resourceName)
|
m.markResourceUnhealthy(resourceName)
|
||||||
klog.V(2).InfoS("Endpoint became unhealthy", "resourceName", resourceName, "endpoint", m.endpoints[resourceName])
|
klog.V(2).InfoS("Endpoint became unhealthy", "resourceName", resourceName, "endpoint", ep)
|
||||||
}
|
|
||||||
|
|
||||||
m.endpoints[resourceName].e.setStopTime(time.Now())
|
ep.e.setStopTime(time.Now())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// PluginListAndWatchReceiver receives ListAndWatchResponse from a device plugin
|
// PluginListAndWatchReceiver receives ListAndWatchResponse from a device plugin
|
||||||
|
@@ -69,8 +69,10 @@ func (c *client) Connect() error {
|
|||||||
klog.ErrorS(err, "Unable to connect to device plugin client with socket path", "path", c.socket)
|
klog.ErrorS(err, "Unable to connect to device plugin client with socket path", "path", c.socket)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
c.mutex.Lock()
|
||||||
c.grpc = conn
|
c.grpc = conn
|
||||||
c.client = client
|
c.client = client
|
||||||
|
c.mutex.Unlock()
|
||||||
return c.handler.PluginConnected(c.resource, c)
|
return c.handler.PluginConnected(c.resource, c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user