[ML] Log when no node found to open job/start datafeed
Relates elastic/x-pack-elasticsearch#878 Original commit: elastic/x-pack-elasticsearch@a64b7eaa80
This commit is contained in:
parent
5c9364d5fe
commit
16d8dc6815
|
@ -407,6 +407,7 @@ public class OpenJobAction extends Action<OpenJobAction.Request, OpenJobAction.R
|
||||||
if (assignment.getExecutorNode() == null) {
|
if (assignment.getExecutorNode() == null) {
|
||||||
String msg = "Could not open job because no suitable nodes were found, allocation explanation ["
|
String msg = "Could not open job because no suitable nodes were found, allocation explanation ["
|
||||||
+ assignment.getExplanation() + "]";
|
+ assignment.getExplanation() + "]";
|
||||||
|
logger.warn("[{}] {}", msg);
|
||||||
auditor.warning(request.getJobId(), msg);
|
auditor.warning(request.getJobId(), msg);
|
||||||
throw new ElasticsearchStatusException(msg, RestStatus.TOO_MANY_REQUESTS);
|
throw new ElasticsearchStatusException(msg, RestStatus.TOO_MANY_REQUESTS);
|
||||||
}
|
}
|
||||||
|
|
|
@ -461,8 +461,10 @@ public class StartDatafeedAction
|
||||||
DatafeedConfig datafeed = mlMetadata.getDatafeed(datafeedId);
|
DatafeedConfig datafeed = mlMetadata.getDatafeed(datafeedId);
|
||||||
String jobId = datafeed.getJobId();
|
String jobId = datafeed.getJobId();
|
||||||
if (assignment.getExecutorNode() == null) {
|
if (assignment.getExecutorNode() == null) {
|
||||||
auditor.warning(jobId, "No node found to start datafeed [" + datafeedId +"]. Reasons [" +
|
String msg = "No node found to start datafeed [" + datafeedId +"]. Reasons [" +
|
||||||
assignment.getExplanation() + "]");
|
assignment.getExplanation() + "]";
|
||||||
|
logger.warn(msg);
|
||||||
|
auditor.warning(jobId, msg);
|
||||||
} else {
|
} else {
|
||||||
DiscoveryNode node = state.nodes().get(assignment.getExecutorNode());
|
DiscoveryNode node = state.nodes().get(assignment.getExecutorNode());
|
||||||
auditor.info(jobId, "Starting datafeed [" + datafeedId + "] on node [" + node + "]");
|
auditor.info(jobId, "Starting datafeed [" + datafeedId + "] on node [" + node + "]");
|
||||||
|
|
Loading…
Reference in New Issue