OpenSearch/plugin
David Roberts c63d32482f [ML] Avoid timeout if ML persistent task assignment fails on master node (elastic/x-pack-elasticsearch#4236)
The ML open_job and start_datafeed endpoints start persistent tasks and
wait for these to be successfully assigned before returning.  Since the
setup sequence is complex they do a "fast fail" validation step on the
coordinating node before the setup sequence.  However, this leads to the
possibility of the "fast fail" validation succeeding and the eventual
persistent task assignment failing due to other changes during the setup
sequence.  Previously when this happened the endpoints would time out,
which in the case of the open_job action takes 30 minutes by default.
The start_datafeed endpoint has a shorter default timeout of 20 seconds,
but in both cases the result of a timeout is an unfriendly HTTP 500
status.

This change adjusts the criteria used to wait for the persistent tasks to
be assigned to account for the possibility of assignment failure and, if
this happens, return an error identical to what the "fast fail"
validation would have returned.  Additionally in this case the unassigned
persistent task is cancelled, leaving the system in the same state as if
the "fast fail" validation had failed.

Original commit: elastic/x-pack-elasticsearch@16916cbc13
2018-03-28 10:06:14 +01:00
..
bwc Relax remote check for bwc project checkouts (elastic/x-pack-elasticsearch#3924) 2018-02-13 14:54:38 -06:00
core Adds missing SAML Realm Settings (elastic/x-pack-elasticsearch#4221) 2018-03-28 09:20:28 +03:00
deprecation Decouple XContentBuilder from BytesReference (elastic/x-pack-elasticsearch#4119) 2018-03-14 13:48:05 -06:00
graph [TEST] Add deterministic routing of docs to shards to prevent 2018-02-19 15:46:51 +00:00
logstash [Logstash][Monitoring] Fix Registered Usage and Add Tests (elastic/x-pack-elasticsearch#4075) 2018-03-08 14:53:05 -08:00
ml [ML] Avoid timeout if ML persistent task assignment fails on master node (elastic/x-pack-elasticsearch#4236) 2018-03-28 10:06:14 +01:00
monitoring [Monitoring] Remove 202 responses in favor of 200 responses (elastic/x-pack-elasticsearch#4213) 2018-03-26 11:36:04 -04:00
rollup [Rollup] Select best jobs then execute msearch-per-job (elastic/x-pack-elasticsearch#4152) 2018-03-27 10:33:59 -07:00
security LdapUserSearch rebind with bind DN after user bind (elastic/x-pack-elasticsearch#4209) 2018-03-28 09:36:02 +03:00
sql SQL: Introduce CSV and TSV tabular output (elastic/x-pack-elasticsearch#4190) 2018-03-23 12:23:00 +02:00
src/test [ML] Avoid timeout if ML persistent task assignment fails on master node (elastic/x-pack-elasticsearch#4236) 2018-03-28 10:06:14 +01:00
upgrade Disable security for trial licenses by default (elastic/x-pack-elasticsearch#4120) 2018-03-21 21:09:44 -06:00
watcher Adjust to XContentBuilder decoupling (elastic/x-pack-elasticsearch#4212) 2018-03-27 12:58:26 -06:00
build.gradle Disable security for trial licenses by default (elastic/x-pack-elasticsearch#4120) 2018-03-21 21:09:44 -06:00