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:
parent
6538542603
commit
c15e5d480c
|
@ -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')
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue