Skip to content

Commit

Permalink
Log on runnable stop
Browse files Browse the repository at this point in the history
Since we changed the behavior so that non-erroring runnable completion
doesn't stop the manager, this logs a log line to make it more obvious
that this has occurred, just in case.
  • Loading branch information
DirectXMan12 committed Oct 29, 2019
1 parent 99c9868 commit 5c7efdd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/manager/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,9 @@ func (cm *controllerManager) startNonLeaderElectionRunnables() {
if err := ctrl.Start(cm.internalStop); err != nil {
cm.errSignal.SignalError(err)
}
// we use %T here because we don't have a good stand-in for "name",
// and the full runnable might not serialize (mutexes, etc)
log.V(1).Info("non-leader-election runnable finished", "runnable type", fmt.Sprintf("%T", ctrl))
}()
}
}
Expand All @@ -474,6 +477,9 @@ func (cm *controllerManager) startLeaderElectionRunnables() {
if err := ctrl.Start(cm.internalStop); err != nil {
cm.errSignal.SignalError(err)
}
// we use %T here because we don't have a good stand-in for "name",
// and the full runnable might not serialize (mutexes, etc)
log.V(1).Info("leader-election runnable finished", "runnable type", fmt.Sprintf("%T", ctrl))
}()
}

Expand Down

0 comments on commit 5c7efdd

Please sign in to comment.