Skip to content

Commit

Permalink
clear machine error when node is ready (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrIncompetent authored May 3, 2018
1 parent 25c35e4 commit 126a083
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkg/controller/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,14 @@ func (c *Controller) syncHandler(key string) error {
if err != nil {
return err
}
} else {
c.recorder.Event(machine, corev1.EventTypeNormal, "NodeReady", "Node was found and is ready")
}

if nodeExistsAndIsReady {
// If we have an ready node, we should clear the error in case one was set.
// Useful when there was a network outage & a cloud-provider api outage at the same time
if machine, err = c.clearMachineErrorIfSet(machine); err != nil {
return fmt.Errorf("failed to clear machine error: %v", err)
}
}

// case 3.3: if the node exists make sure if it has labels and taints attached to it.
Expand Down

0 comments on commit 126a083

Please sign in to comment.