Skip to content

Commit 4d81992

Browse files
committed
Log on runnable stop
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.
1 parent fe4ada0 commit 4d81992

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/manager/internal.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,9 @@ func (cm *controllerManager) startNonLeaderElectionRunnables() {
455455
if err := ctrl.Start(cm.internalStop); err != nil {
456456
cm.errSignal.SignalError(err)
457457
}
458+
// we use %T here because we don't have a good stand-in for "name",
459+
// and the full runnable might not serialize (mutexes, etc)
460+
log.V(1).Info("non-leader-election runnable finished", "runnable type", fmt.Sprintf("%T", ctrl))
458461
}()
459462
}
460463
}
@@ -474,6 +477,9 @@ func (cm *controllerManager) startLeaderElectionRunnables() {
474477
if err := ctrl.Start(cm.internalStop); err != nil {
475478
cm.errSignal.SignalError(err)
476479
}
480+
// we use %T here because we don't have a good stand-in for "name",
481+
// and the full runnable might not serialize (mutexes, etc)
482+
log.V(1).Info("leader-election runnable finished", "runnable type", fmt.Sprintf("%T", ctrl))
477483
}()
478484
}
479485

0 commit comments

Comments
 (0)