Commit graph

253 commits

Author SHA1 Message Date
Joe Gallo
3bde177fea
Rollover min_* conditions docs and highlight (#89434) 2022-08-17 15:24:18 -04:00
Stef Nestor
5da482b9de
ILM Frozen allows Unfollow Action (#88973)
Updates [Phase Action](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-index-lifecycle.html#ilm-phase-actions) list to agree with [Unfollow](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-unfollow.html) page that Frozen tier accepts Unfollow action.

Confirmed v8.3
```diff
PUT _ilm/policy/my_policy
{"policy": {"phases": { "frozen": { "actions": {
+  "unfollow" : {},
  "searchable_snapshot": {
    "snapshot_repository" : "found-snapshots"} } } } } }

{"acknowledged": true }
```
2022-08-03 14:32:15 -06:00
Stef Nestor
4af7069958
Update ES.ILM.Action.ReadOnly (#89054)
Related to [Discuss#311070](https://discuss.elastic.co/t/action-readonly-appears-to-set-index-blocks-write-not-index-blocks-read-only/311070), @joegallo explains

> The [ReadOnlyAction](https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/ReadOnlyAction.java#L58-L65) is composed of a series of steps, the most important to this conversation being the [ReadOnlyStep](https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/ReadOnlyStep.java#L42). That step does indeed add a write block (as opposed to a ‘read_only’) block, almost certainly the reasoning is that a ‘read_only’ block makes the index metadata read only, also, and we can’t have that — it would prevent the index from moving through the rest of the ILM process.  E.g. can’t reassign tiers, can’t change replicas, can’t even change the currently assigned ilm phase/action/step, etc, if you can’t change the index’s metadata.

So, the intention of ILM Action "Read Only" is to make an index's data read only and not also the index's metadata. This also decouples "read only" from understanding overlapping to `index.blocks.read_only` which appears to be an accidental thought overlap.
2022-08-03 14:31:20 -06:00
Robson Sutton
320c89ba93
Fix byte unit typo in ILM rollover doc (#87780) 2022-06-23 09:33:47 +02:00
Jean-Fabrice Bobo
37c346cb2f
Update error-handling.asciidoc (#86795)
Co-authored-by: Lee Hinman <dakrone@users.noreply.github.com>
2022-06-01 14:57:38 -06:00
debadair
3d4dea8336
[DOCS] Remove unnecessary link. (#86205) 2022-04-27 15:44:43 -07:00
Joe Gallo
326359f022
Remove ILM docs redirect (#85628) 2022-04-04 13:43:50 -04:00
Lee Hinman
2d24f6ab8f
Clarify where force merge will occur in ILM (#85187)
This commit clarifies the force merge behavior for the `forcemerge` action either as a standalone
ILM action, or as part of the searchable snapshot action. When using a searchable snapshot it can be
confusing especially because the force merge can occur in a phase prior to the phase configured in
the ILM policy (since ILM doesn't migrate the index prior to the searchable snapshot mounting).
2022-03-24 11:30:29 -06:00
Alex Chan
94f7d739d8
[DOCS] Fix a typo: "bult-in" ~> "built-in" (#84861) 2022-03-10 10:29:05 -05:00
Dan Roscigno
37beabcb2e
reorder and merge data management and ILM doc pages (#84679)
* reorder and merge data management and ILM doc pages

* update abbreviated titles
2022-03-07 18:33:28 -05:00
Andrei Dan
23a7b6bb4d
DOCS: more visibility over how min_age works when rollover is present (#84273) 2022-03-01 11:32:38 +00:00
weizijun
79132ed57b
Add rollover add max_primary_shard_docs condition (#80981)
Add a new rollover condition with the name `max_primary_shard_docs`.
Triggers rollover when the largest primary shard in the index reaches a certain number of documents.
2022-02-08 14:04:04 +01:00
Andrei Dan
3087f164f7
Migrate legacy/v2/component templates away from custom attributes routing (#82472)
This enhances the migrate to data tiers routing API to also iterate over
the existing legacy, composable, and component templates and look if
they define a custom node attribute routing in their settings for either
`index.routing.allocation.require.{nodeAttrName}` or
`index.routing.allocation.include.{nodeAttrName}`. If any does, we
update them to remove all the routings settings for the provided
`nodeAttrName`.

eg. any template with the following setting configuration:
```
"settings": {
  index.routing.allocation.require.data: "warm",
  index.routing.allocation.include.data: "rack1",
  index.routing.allocation.exclude.data: "rack2,rack3"
}
```
will have its settings updated to:
```
"settings": {}
```
2022-01-13 10:45:10 +00:00
Andrei Dan
f18c9c503e
Migrate to data tiers API dry run on any ILM status (#82226)
The migrate to data tiers routing API required ILM to be stopped. This
is fine for "live" runs, but for dry runs this isn't a requirement.

This changes the dry_run to allow the API to run irrespective of the ILM
status.
2022-01-05 13:40:27 +00:00
Stef Nestor
9fd280b67e
[DOC] Don't include searchable snapshot ILM action in both hot and cold phases (#82013)
As outlined in elastic/elasticsearch#81604, including the `searchable_snapshot` action in both the hot and cold phases can result in indices not automatically migrating to the cold tier during the cold phase.

This adds a related warning.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2022-01-04 12:37:05 -05:00
Mary Gouseti
175c4793f9
Expose the index age in ILM explain output. (#81273)
* Expose the index age in ILM explain output.

 ILM already exposes the `age` that ILM will use to transition to the next phase, based on that phase's `min_age`. The `index_age` is based only on the index creation date and it's used to trigger a rollover.

 Resolves #64429
2021-12-13 15:38:25 +01:00
Joe Gallo
27186ceda7
_tier_preference docs tweaks (#81453) 2021-12-08 10:34:30 -05:00
Tanguy Leroux
061d38ca5a
Mention prefixes of mounted index in ILM Searchable Snapshot action (#81421)
The searchable snapshot action mounts snapshots as indices 
with a different prefix depending of the phase. This commit
tries to mention them in the docs.
2021-12-07 15:35:53 +01:00
James Rodewig
659e0d3fd3
[DOCS] Overhaul snapshot and restore docs (#79081)
Makes several changes to consolidate snapshot and backup-related docs.

Highlights:

* Adds info about supported ESS snapshot repository types
* Adds docs for Kibana's Snapshot and Restore feature
* Combines tutorial pages related to taking and managing snapshots
* Consolidates explanations of the snapshot process
* Incorporates SLM into the snapshot tutorial
* Removes duplicate "back up a cluster" pages
2021-11-15 12:45:07 -05:00
Stef Nestor
a8ae234dbe
[+Doc] Performance Tune ILM ForceMerge (#80448)
* [+Doc] Performance Tune ILM ForceMerge
Co-authored-by: Deb Adair <debadair@elastic.co>
2021-11-10 08:48:07 -07:00
James Rodewig
f56a0f4b66
[DOCS] Remove testenv annotations from doc snippet tests (#80023)
Removes `testenv` annotations and related code. These annotations originally let you skip x-pack snippet tests in the docs. However, that's no longer possible.

Relates to #79309, #31619
2021-11-05 18:38:50 -04:00
edh-oss
3c23a9e9cd
[DOCS] Remove [testenv="gold+"] attributes (#79309)
Changes:

* Removes several `[testenv="gold+"]` attributes from the docs. `gold+` is not a valid [subscription level](https://www.elastic.co/subscriptions) or testenv value.
* Moves two `[testenv="basic"]` attributes to the file header. This makes the `testenv` placement consistent and fixes the yml file generated from `docs/reference/snapshot-restore/register-repository.asciidoc`.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-10-27 16:32:30 -04:00
Dan Hermann
4a36d5cd79
Remove endpoint for freezing indices (#78918) 2021-10-26 06:37:56 -05:00
Joe Gallo
8da1671077
Inject migrate action regardless of allocate action (#79090) 2021-10-15 17:12:26 -04:00
Nikola Grcevski
055c770083
Deprecation of transient cluster settings (#78794)
This PR changes uses of transient cluster settings to
persistent cluster settings. 

The PR also deprecates the transient settings usage.

Relates to #49540
2021-10-15 13:00:52 -04:00
Joe Gallo
4a14f2f6f9
Validate that snapshot repository exists for ILM policies at creation/update time (#78468) 2021-10-04 15:19:10 -04:00
David Turner
f2a5706d22
Add docs on searchable snaps costs (#77607)
* Add docs on searchable snaps costs

Adds a note on why searchable snapshots is cheaper, including warnings
that it might be more expensive too.

* Split into sections

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

* data -> the shard contents

* More wording tweaks

* Apply suggestions from code review

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-09-15 03:27:52 -04:00
Lee Hinman
35def9464c
Make the ILM freeze action a no-op (#77158)
* Make the ILM `freeze` action a no-op

This changes the ILM `freeze` action to not actually freeze the index, instead performing no
operation.

Relates to #70192

* zoop -> noop in documentation anchor

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-09-08 16:05:46 -04:00
James Rodewig
cfae69717a
[DOCS] Update anchor and add redirect for aliases (#77349)
PRs #73062 and #73043 repurposed the `alias` anchor for a new guide for index
and data stream aliases. Previously, this anchor was used for our field alias
documentation.

Repurposing the anchor has caused continuity errors for users selecting
different versions of the ES docs. It could also cause confusion for users with
a `/current/` link to the `alias` page.

This updates the anchor for the alias guide and adds a redirect page to
disambiguate the `alias` anchor.

It also fixes a bread crumb issue for redirects following the 'Modifying your
Data' redirect page.

Closes #77034.
2021-09-07 09:42:42 -04:00
debadair
12dda6fb36
[DOCS] Add ILM error/troubleshooting info. Closes #75849 (#76957)
* [DOCS] Add ILM error/troubleshooting info. Closes #75849

* Apply suggestions from code review

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

* Updated xref & fixed whitespace issues

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-08-26 15:44:50 -04:00
Keith Massey
0aab3c01c9
Ensuring that the ShrinkAction does not hang if total shards per node is too low (#76732)
We added configuration to AllocateAction to set the total shards per node property on the index. This makes it possible that a user could set this to a value lower than the total number of shards in the index that is about to be shrunk, meaning that all of the shards could not be moved to a single node in the ShrinkAction. This commit unsets the total shards per node property so that we fall back to the default value (-1, unlimited) in the ShrinkAction to avoid this.
Relates to #44070
2021-08-20 09:41:19 -05:00
Keith Massey
8610db674a
Allow for setting the total shards per node in the Allocate ILM action (#76134)
This adds a new optional field to the allocate ILM action called "total_shards_per_node". If present, the
value of this field is set as the value of "index.routing.allocation.total_shards_per_node" before the allocation
takes place.
Relates to #44070
2021-08-11 16:35:46 -05:00
Lee Hinman
3d5843a236
Allow ILM move-to-step without action or name (#75435)
* Allow ILM move-to-step without `action` or `name`

This commit enhances ILM's move-to-step API to allow dropping the `name`, or dropping both the
`action` and `name`. For example:

```json
POST /_ilm/move/foo-1
{
  "current_step": {
    "phase": "hot",
    "action": "rollover",
    "name": "check-rollover-ready"
  },
  "next_step": {
    "phase": "warm",
    "action": "forcemerge"
  }
}
```

Will move to the first step in the `forcemerge` action in the `warm` phase (without having to know
the specific step name).

Another example:

```json
POST /_ilm/move/foo-1
{
  "current_step": {
    "phase": "hot",
    "action": "rollover",
    "name": "check-rollover-ready"
  },
  "next_step": {
    "phase": "warm"
  }
}
```

Will move to the first step in the `warm` phase (without having to know the specific action name).

Bear in mind that the execution order is still entirely an implementation detail, so "first" in the
above sentences means the first step that ILM would execute.

Resolves #58128

* Apply Andrei's wording change (thanks!)

Co-authored-by: Andrei Dan <andrei.dan@elastic.co>

* Log index and policy name when the concrete step key can't be resolved

Co-authored-by: Andrei Dan <andrei.dan@elastic.co>
2021-07-19 12:10:25 -04:00
Stef Nestor
fdcb9c3247
[DOCS] Note ILM searchable_snapshot action requires data tiers (#74706) 2021-06-30 11:03:11 -04:00
Andrei Dan
5e9405a513
[DOCS]: allow multiple searchable_snapshot actions in the same policy (#74679)
Since `7.12` we allow multiple searchable_snapshot actions in the same
policy. This updates the docs to reflect this.
2021-06-29 14:20:26 +01:00
Andrei Dan
5ca240eabd
Add dry_run support to the migrate to data tiers API (#74639)
This adds support for a `dry_run` parameter for the
`_ilm/migrate_to_data_tiers` API. This defaults to `false`, but when
configured to `true` it will simulate the migration of elasticsearch
entities to data tiers based routing, returning the entites that need to
be updated (indices, ILM policies and the legacy index template that'd
be deleted, if any was configured in the request).
2021-06-29 10:37:16 +01:00
James Rodewig
0c205b0d68
[DOCS] Document how to switch ILM policies (#73967)
To switch an index's lifecycle policy, you must first remove the existing
policy. Otherwise, phase execution for the index may silently fail.

Closes #70151
2021-06-28 10:32:01 -04:00
Andrei Dan
636aa7c0da
Add migrate to data tiers API (#74264)
This adds the _ilm/migrate_to_data_tiers API to expose the service for
migrating the elasticsearch abstractions (indices, ILM policies and an 
optional legacy template to delete) to data tiers routing allocation 
(away from custom node attributes)
2021-06-28 12:07:39 +01:00
James Rodewig
2fe07014d9
[DOCS] Move ES glossary to Stack docs (#74579)
The ES glossary is now incorporated into the [Elastic glossary](https://www.elastic.co/guide/en/elastic-stack-glossary/current/terms.html).

Depends on https://github.com/elastic/stack-docs/pull/1722 and https://github.com/elastic/docs/pull/2141
2021-06-24 19:04:31 -04:00
Lee Hinman
997db17852
Add usage to get ILM policy response (#74518)
This commit adds the "in_use_by" object to the response for ILM policies. This map shows the
indices, data streams, and composable templates that use the ILM policy.

An example output may look like:

```json
{
  "logs" : {
    "version" : 1,
    "modified_date" : "2021-06-23T18:42:08.381Z",
    "policy" : {
      ...
    },
    "in_use_by" : {
      "indices" : [".ds-logs-foo-barbaz-2021.06.23-000001", ".ds-logs-foo-other-2021.06.23-000001"],
      "data_streams" : ["logs-foo-barbaz", "logs-foo-other"],
      "composable_templates" : ["logs"]
    }
  }
}
```

Resolves #73869
2021-06-23 16:01:19 -06:00
Stef Nestor
8b8466b42c
[DOCS] Fix ILM action order (#74021)
Following [this code](https://github.com/elastic/elasticsearch/blob/master/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/TimeseriesLifecycleType.java#L54) I believe these are the necessary changes to bring the doc into alignment.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-06-10 14:28:44 -04:00
Stef Nestor
fc1ea9c317
[DOCS] Fix operation_mode response property def (#73976) 2021-06-10 13:31:15 -04:00
bellengao
b6fd1bbb06
Add _meta field to ilm policy (#73515)
Relates to #70755.

The main changes of this PR are:

    Add an optional _meta field to ILM policy.
    Add some test code about the change.
    Update the doc of Create or update lifecycle policy API.
2021-06-01 11:17:53 -06:00
James Rodewig
5729bb8d49
[DOCS] Update alias references (#73427)
Updates several `index aliases` references to `aliases`.
2021-05-27 16:00:57 -04:00
James Rodewig
39a0314d30
[DOCS] Update alias xrefs (#73380)
Updates several internal 'alias' xrefs to point to the aliases guide rather than
API docs.
2021-05-25 16:19:00 -04:00
Andrei Dan
6a38aff777
[DOCS] Clarify that at least one met condition triggers rollover (#73224) 2021-05-24 19:15:16 +01:00
James Rodewig
c9223a25a4
[DOCS] Update anchor for alias write index (#73108)
Updates the anchor for our alias write index content. Changes are no-op, but this helps prepare for future work on alias docs.
2021-05-14 12:35:25 -04:00
James Rodewig
8dddca77aa
[DOCS] Remove and redirect frozen index overview content (#72990)
Changes:

* Removes and adds redirects for the frozen indices [overview][0], [best
  practices][1], [search][2], and [monitoring][3] pages.
* Removes glossary terms related to frozen indices.
* Updates several xrefs to point to the freeze index API docs.

Relates to elastic/elasticsearch#72946 and elastic/elasticsearch#70192.

[0]: https://www.elastic.co/guide/en/elasticsearch/reference/7.12/frozen-indices.html
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/master/best_practices.html
[2]: https://www.elastic.co/guide/en/elasticsearch/reference/master/searching_a_frozen_index.html
[3]: https://www.elastic.co/guide/en/elasticsearch/reference/master/monitoring_frozen_indices.html
2021-05-12 12:54:20 -04:00
James Rodewig
dbad9d0a0d
[DOCS] Update 'shared_cache' references for searchable snapshots (#72775) 2021-05-05 17:49:15 -04:00
debadair
633e1322f1
[DOCS] How to migrate to node roles from node attrs. Closes #65855 (#71160)
* [DOCS] Document how to migrate to node roles from node attrs. Closes #65855

* [DOCS] Incorporated review comments

* Update docs/reference/data-management/migrate-index-allocation-filters.asciidoc

Co-authored-by: Andrei Dan <andrei.dan@elastic.co>
2021-04-27 14:39:54 -07:00