2019-01-30 07:51:11 -05:00
|
|
|
--
|
|
|
|
:api: set-upgrade-mode
|
|
|
|
:request: SetUpgradeModeRequest
|
|
|
|
:response: AcknowledgedResponse
|
|
|
|
--
|
2019-09-10 11:26:56 -04:00
|
|
|
[role="xpack"]
|
2019-01-30 07:51:11 -05:00
|
|
|
[id="{upid}-{api}"]
|
2020-09-04 19:57:15 -04:00
|
|
|
=== Set upgrade mode API
|
2019-01-30 07:51:11 -05:00
|
|
|
|
2020-10-02 17:01:01 -04:00
|
|
|
Temporarily halts all {ml} job and {dfeed} tasks when `enabled=true`. Their
|
2019-01-30 07:51:11 -05:00
|
|
|
reported states remain unchanged. Consequently, when exiting upgrade mode the halted {ml} jobs and
|
|
|
|
{dfeeds} will return to their previous state.
|
|
|
|
|
|
|
|
It accepts a +{request}+ object and responds with a +{response}+ object.
|
|
|
|
|
|
|
|
When `enabled=true`, no new jobs can be opened, and no job or {dfeed} tasks will
|
|
|
|
be running. Be sure to set `enabled=false` once upgrade actions are completed.
|
|
|
|
|
|
|
|
[id="{upid}-{api}-request"]
|
2020-09-04 19:57:15 -04:00
|
|
|
==== Set upgrade mode request
|
2019-01-30 07:51:11 -05:00
|
|
|
|
|
|
|
A +{request}+ object gets created setting the desired `enabled` state.
|
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
|
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
|
|
|
--------------------------------------------------
|
|
|
|
<1> Constructing a new request referencing enabling upgrade mode
|
|
|
|
<2> Optionally setting the `timeout` value for how long the
|
|
|
|
execution should wait.
|
|
|
|
|
|
|
|
[id="{upid}-{api}-response"]
|
2020-09-04 19:57:15 -04:00
|
|
|
==== Set upgrade mode response
|
2019-01-30 07:51:11 -05:00
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
|
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
|
|
|
--------------------------------------------------
|
|
|
|
<1> `isAcknowledged()` from the +{response}+ indicates if the setting was set successfully.
|
|
|
|
|
|
|
|
include::../execution.asciidoc[]
|