Log container logs for failed containers if failedCount > max

pull/6/head
Phillip Wittrock 2016-02-29 12:19:00 -08:00
parent d1d036391a
commit 1b9a3fd5f8
1 changed files with 2 additions and 0 deletions

View File

@ -1833,6 +1833,8 @@ func (config *RCConfig) start() error {
if failedContainers > maxContainerFailures {
dumpNodeDebugInfo(config.Client, containerRestartNodes.List())
// Get the logs from the failed containers to help diagnose what caused them to fail
logFailedContainers(config.Namespace)
return fmt.Errorf("%d containers failed which is more than allowed %d", failedContainers, maxContainerFailures)
}
if len(pods) < len(oldPods) || len(pods) > config.Replicas {