Merge pull request #4206 from jrkeen/fix/deadlock_for_node_getter
fix deadlock for node getter
This commit is contained in:
@@ -173,6 +173,7 @@ func (c *nodesGetter) annotateNode(node *v1.Node, pods []*v1.Pod) {
|
||||
if lastAnnotatedAt, ok := node.Annotations[nodeAnnotatedAt]; ok {
|
||||
if lastAnnotationTimeStamp, err := time.Parse(time.RFC3339, lastAnnotatedAt); err != nil {
|
||||
if lastAnnotationTimeStamp.Add(30 * time.Second).After(time.Now()) {
|
||||
c.mutex.Unlock()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user