Improve logging in ClusterFormationTasks#configureWaitTask (#28637)

We suspect a build failure might be due to a startup timeout, but there is 
insufficient information in the logs. This change enhances the information
available so we will be better-informed next time.
This commit is contained in:
David Turner 2018-02-12 18:46:25 +01:00 committed by GitHub
parent 6538542603
commit c15e5d480c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -601,11 +601,18 @@ class ClusterFormationTasks {
}
}
}
if (ant.properties.containsKey("failed${name}".toString())) {
waitFailed(project, nodes, logger, "Failed to start elasticsearch: timed out after ${waitSeconds} seconds")
}
boolean anyNodeFailed = false
for (NodeInfo node : nodes) {
anyNodeFailed |= node.failedMarker.exists()
if (node.failedMarker.exists()) {
logger.error("Failed to start elasticsearch: ${node.failedMarker.toString()} exists")
anyNodeFailed = true
}
}
if (ant.properties.containsKey("failed${name}".toString()) || anyNodeFailed) {
if (anyNodeFailed) {
waitFailed(project, nodes, logger, 'Failed to start elasticsearch')
}