Skip to content

Commit

Permalink
Merge branch 'master' into security_api_keys
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymode committed Nov 9, 2018
2 parents d1e838b + f2d7c94 commit 0cb799f
Show file tree
Hide file tree
Showing 85 changed files with 1,276 additions and 670 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ class ClusterConfiguration {
return seedNode.transportUri()
}

/**
* A closure to call which returns a manually supplied list of unicast seed hosts.
*/
@Input
Closure<List<String>> otherUnicastHostAddresses = {
Collections.emptyList()
}

/**
* A closure to call before the cluster is considered ready. The closure is passed the node info,
* as well as a groovy AntBuilder, to enable running ant condition checks. The default wait
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -715,8 +715,9 @@ class ClusterFormationTasks {
wait.doLast {

Collection<String> unicastHosts = new HashSet<>()
nodes.forEach { otherNode ->
String unicastHost = otherNode.config.unicastTransportUri(otherNode, null, project.ant)
nodes.forEach { node ->
unicastHosts.addAll(node.config.otherUnicastHostAddresses.call())
String unicastHost = node.config.unicastTransportUri(node, null, project.ant)
if (unicastHost != null) {
unicastHosts.addAll(Arrays.asList(unicastHost.split(",")))
}
Expand Down
3 changes: 3 additions & 0 deletions docs/plugins/repository-s3.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ You may further restrict the permissions by specifying a prefix within the bucke
The bucket needs to exist to register a repository for snapshots. If you did not create the bucket then the repository
registration will fail.

Note: Starting in version 7.0, all bucket operations are using the path style access pattern. In previous versions the decision to use virtual hosted style
or path style access was made by the AWS Java SDK.

[[repository-s3-aws-vpc]]
[float]
==== AWS VPC Bandwidth Settings
Expand Down
24 changes: 10 additions & 14 deletions docs/reference/ilm/apis/delete-lifecycle.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@
<titleabbrev>Delete Policy</titleabbrev>
++++

Deletes an existing lifecycle policy
Deletes a lifecycle policy.

==== Request

`DELETE _ilm/policy/<policy>`
`DELETE _ilm/policy/<policy_id>`

==== Description

Deletes an existing lifecycle policy
Deletes the specified lifecycle policy definition. You cannot delete policies
that are currently in use. If the policy is being used to manage any indices,
the request fails and returns an error.

==== Path Parameters

Expand All @@ -23,21 +25,15 @@ Deletes an existing lifecycle policy

==== Request Parameters

`timeout`::
(time units) Specifies the period of time to wait for the completion of the
DELETE operation. When this period of time elapses, the API fails and returns
an error. The default value is `30s`. For more information about time units,
see <<time-units>>.
include::{docdir}/rest-api/timeoutparms.asciidoc[]

`master_timeout`::
(time units) Specifies the period of time to wait for the connection with master.
When this period of time elapses, the API fails and returns an error.
The default value is `30s`. For more information about time units, see <<time-units>>.
==== Authorization

include::ilm-cluster-mgt-privilege.asciidoc[]

==== Examples

The following example deletes an existing policy named `my_policy`:
The following example deletes `my_policy`:

//////////////////////////
Expand Down Expand Up @@ -77,7 +73,7 @@ DELETE _ilm/policy/my_policy
// CONSOLE
// TEST[continued]

If the request does not encounter errors, you receive the following result:
When the policy is successfully deleted, you receive the following result:

[source,js]
--------------------------------------------------
Expand Down
102 changes: 44 additions & 58 deletions docs/reference/ilm/apis/explain.asciidoc
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
[role="xpack"]
[testenv="basic"]
[[ilm-explain]]
[[ilm-explain-lifecycle]]
=== Explain Lifecycle API
++++
<titleabbrev>Explain Lifecycle</titleabbrev>
++++

Shows the current lifecycle status for an index.
Shows an index's current lifecycle status.

==== Request

`GET <index>/_ilm/explain`

==== Description

This API returns information relating to the current lifecycle state of an
index. This includes information such as the currently executing phase, action,
and step and the timestamp when the index entered them. It also shows the
definition of the current phase that is being run and in the event that there
has been a failure, information regarding the failure.
Retrieves information about the index's current lifecycle state, such as
the currently executing phase, action, and step. Shows when the index entered
each one, the definition of the running phase, and information
about any failures.

==== Path Parameters

Expand All @@ -27,21 +26,15 @@ has been a failure, information regarding the failure.

==== Request Parameters

`timeout`::
(time units) Specifies the period of time to wait for the completion of the
GET operation. When this period of time elapses, the API fails and returns
an error. The default value is `30s`. For more information about time units,
see <<time-units>>.
include::{docdir}/rest-api/timeoutparms.asciidoc[]

`master_timeout`::
(time units) Specifies the period of time to wait for the connection with master.
When this period of time elapses, the API fails and returns an error.
The default value is `30s`. For more information about time units, see <<time-units>>.
==== Authorization

include::ilm-index-mgt-privilege.asciidoc[]

==== Examples

The following example retrieves the lifecycle state for the index `my_index`:
The following example retrieves the lifecycle state of `my_index`:

//////////////////////////
Expand Down Expand Up @@ -91,7 +84,8 @@ GET my_index/_ilm/explain
// CONSOLE
// TEST[continued]

When the index is first taken over by ILM you will see a response like the following:
When management of the index is first taken over by ILM, `explain` shows
that the index is managed and in the `new` phase:

[source,js]
--------------------------------------------------
Expand All @@ -102,12 +96,12 @@ When the index is first taken over by ILM you will see a response like the follo
"managed": true, <1>
"policy": "my_policy", <2>
"lifecycle_date_millis": 1538475653281, <3>
"phase": "new", <4>
"phase_time_millis": 1538475653317, <5>
"action": "complete", <6>
"action_time_millis": 1538475653317, <7>
"step": "complete", <8>
"step_time_millis": 1538475653317 <9>
"phase": "new",
"phase_time_millis": 1538475653317, <4>
"action": "complete",
"action_time_millis": 1538475653317, <5>
"step": "complete",
"step_time_millis": 1538475653317 <6>
}
}
}
Expand All @@ -121,17 +115,14 @@ When the index is first taken over by ILM you will see a response like the follo
ILM the other fields will not be shown
<2> The name of the policy which ILM is using for this index
<3> The timestamp used for the `min_age`
<4> The current phase
<5> The timestamp for when the index entered the current phase
<6> The current action
<7> The timestamp for when the index entered the current action
<8> The current step
<9> The timestamp for when the index entered the current step
<4> When the index entered the current phase
<5> When the index entered the current action
<6> When the index entered the current step

When the policy is running on the index the response will contain a
`phase_execution` object that describes the exact phase that is being run.
Once the policy is running on the index, the response includes a
`phase_execution` object that shows the definition of the current phase.
Changes to the underlying policy will not affect this index until the current
phase definition has been completely executed.
phase completes.

[source,js]
--------------------------------------------------
Expand All @@ -152,36 +143,34 @@ phase definition has been completely executed.
"step": "attempt_rollover",
"step_time_millis": 1538475653317,
"step_time": "2018-10-15T13:45:22.577Z",
"phase_execution": { <1>
"policy": "my_lifecycle3", <2>
"phase_definition": { <3>
"phase_execution": {
"policy": "my_lifecycle3",
"phase_definition": { <1>
"min_age": "0ms",
"actions": {
"rollover": {
"max_age": "30s"
}
}
},
"version": 3, <4>
"modified_date": "2018-10-15T13:21:41.576Z", <5>
"modified_date_in_millis": 1539609701576 <6>
"version": 3, <2>
"modified_date": "2018-10-15T13:21:41.576Z", <3>
"modified_date_in_millis": 1539609701576 <4>
}
}
}
}
--------------------------------------------------
// CONSOLE
// TESTRESPONSE[skip:not possible to get the cluster into this state in a docs test]
<1> The phase execution information for this index in its current phase
<2> The policy that this phase definition was loaded from
<3> The phase definition itself. This is the JSON for the phase loaded from the
policy at the time the index entered the current phase
<4> The version of the policy at the time the phase definition was loaded
<5> The last modified date of the policy at the time the phase definition was loaded
<6> The last modified epoch time of the policy at the time the phase definition was loaded

<1> The JSON phase definition loaded from the specified policy when the index
entered this phase
<2> The version of the policy that was loaded
<3> The date the loaded policy was last modified
<4> The epoch time when the loaded policy was last modified

If the policy is waiting for a step to complete for the index, the response will contain step information such as:
If {ILM} is waiting for a step to complete, the response includes status
information for the step that's being performed on the index.

[source,js]
--------------------------------------------------
Expand Down Expand Up @@ -236,14 +225,12 @@ If the policy is waiting for a step to complete for the index, the response will
--------------------------------------------------
// CONSOLE
// TESTRESPONSE[skip:not possible to get the cluster into this state in a docs test]
<1> `step_info` shows information about what ILM is waiting for on this index.
In this case we are waiting for all shard copies of the index to be active.
<1> Status of the step that's in progress.

If the index is in the ERROR step, something has gone wrong when executing a
step in the policy and will need to be investigated and resolved for the index
to make progress. TO help determine how to resolve the error the explain response
will show the step that failed in `failed_step`, and the information on the error
that occurred in `step_info`.
If the index is in the ERROR step, something went wrong while executing a
step in the policy and and you will need to take action for the index to proceed
to the next step. To help you diagnose the problem, the explain response shows
the step that failed and the step info provides information about the error.

[source,js]
--------------------------------------------------
Expand Down Expand Up @@ -291,6 +278,5 @@ that occurred in `step_info`.
--------------------------------------------------
// CONSOLE
// TESTRESPONSE[skip:not possible to get the cluster into this state in a docs test]
<1> The step that caused an error
<2> Information on the error that occurred. In this case the next index already
existed when the rollover operation was performed
<1> The step that caused the error
<2> What went wrong
30 changes: 12 additions & 18 deletions docs/reference/ilm/apis/get-lifecycle.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@
<titleabbrev>Get Policy</titleabbrev>
++++

Retrieves an existing policy
Retrieves a lifecycle policy.

==== Request

`GET _ilm/policy`
`GET _ilm/policy/<policy>`
`GET _ilm/policy/<policy_id>`

==== Description

This API returns a policy definition along with some of its metadata like
its last modified date and version. If no path parameters are provided, then
all the policies defined will be returned.
Returns the specified policy definition. Includes the policy version and last
modified date. If no policy is specified, returns all defined policies.

==== Path Parameters

Expand All @@ -26,21 +25,15 @@ all the policies defined will be returned.

==== Request Parameters

`timeout`::
(time units) Specifies the period of time to wait for the completion of the
GET operation. When this period of time elapses, the API fails and returns
an error. The default value is `30s`. For more information about time units,
see <<time-units>>.
include::{docdir}/rest-api/timeoutparms.asciidoc[]

`master_timeout`::
(time units) Specifies the period of time to wait for the connection with master.
When this period of time elapses, the API fails and returns an error.
The default value is `30s`. For more information about time units, see <<time-units>>.
==== Authorization

include::ilm-cluster-mgt-privilege.asciidoc[]

==== Examples

The following example retrieves the policy named `my_policy`:
The following example retrieves `my_policy`:

//////////////////////////
Expand Down Expand Up @@ -80,7 +73,8 @@ GET _ilm/policy
// CONSOLE
// TEST[continued]

If the request does not encounter errors, you receive the following result:

If the request succeeds, the body of the response contains the policy definition:

[source,js]
--------------------------------------------------
Expand Down Expand Up @@ -111,5 +105,5 @@ If the request does not encounter errors, you receive the following result:
--------------------------------------------------
// CONSOLE
// TESTRESPONSE[s/"modified_date": 82392349/"modified_date": $body.my_policy.modified_date/]
<1> The version of the policy. This is increased whenever the policy is updated
<2> The timestamp when this policy was last modified
<1> The policy version is incremented whenever the policy is updated
<2> When this policy was last modified
Loading

0 comments on commit 0cb799f

Please sign in to comment.