Commit Graph

62 Commits

Author SHA1 Message Date
Yannick Welsch 356066ce6a Revert "Mute get-ccr-stats doctest (#48375)"
This reverts commit f861927e8b8fc987949ce996a131a2d272b9646e.
2019-10-30 11:13:29 +01:00
Alan Woodward 3be6135ceb Mute get-ccr-stats doctest (#48375)
This test is failing frequently, due to #47718
2019-10-23 15:20:35 +01:00
Tanguy Leroux fe15d9f784
Add documentation for Pause/Resume Auto-Follower APIs (#47985) (#48034)
Relates #47510

Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
2019-10-15 08:38:49 +02:00
Tanguy Leroux 742fa818b8
Add Pause/Resume Auto Follower APIs (#47510) (#47904)
This commit adds two APIs that allow to pause and resume
CCR auto-follower patterns:

// pause auto-follower
POST /_ccr/auto_follow/my_pattern/pause

// resume auto-follower
POST /_ccr/auto_follow/my_pattern/resume

The ability to pause and resume auto-follow patterns can be
useful in some situations, including the rolling upgrades of
cluster using a bi-directional cross-cluster replication scheme
(see #46665).

This commit adds a new active flag to the AutoFollowPattern
and adapts the AutoCoordinator and AutoFollower classes so
that it stops to fetch remote's cluster state when all auto-follow
patterns associate to the remote cluster are paused.

When an auto-follower is paused, remote indices that match the
pattern are just ignored: they are not added to the pattern's
followed indices uids list that is maintained in the local cluster
state. This way, when the auto-follow pattern is resumed the
indices created in the remote cluster in the meantime will be
picked up again and added as new following indices. Indices
created and then deleted in the remote cluster will be ignored
as they won't be seen at all by the auto-follower pattern at
resume time.

Backport of #47510 for 7.x
2019-10-13 09:22:51 +02:00
Lisa Cawley 39ef795085
[DOCS] Cleans up links to security content (#47610) (#47703) 2019-10-07 15:23:19 -07:00
Pius 9c60e15ebd [DOCS] Add 'remote clusters' requirement link to CCR docs (#47185) 2019-09-26 16:15:21 -04:00
James Rodewig 6863b90272 [DOCS] Remove leveloffset for CCR docs (#46818) 2019-09-18 09:44:43 -04:00
James Rodewig 9dcf8a53a2 [DOCS] Add CCR docs to the Elasticsearch Reference Guide (#45704)
Previously, cross-cluster replication (CCR) documentation was located in
the Stack Overview:
https://www.elastic.co/guide/en/elastic-stack-overview/master/xpack-ccr.html

This adds CCR documentation to the Elasticsearch Reference Guide with a
level offset for headings.

The level offset and CCR Stack Overview docs will be removed in later
commits.
2019-09-17 14:26:20 -04:00
James Rodewig b59ecde041
[DOCS] [2 of 5] Change // CONSOLE comments to [source,console] (#46353) (#46502) 2019-09-09 13:38:14 -04:00
James Rodewig f04573f8e8
[DOCS] [5 of 5] Change // TESTRESPONSE comments to [source,console-results] (#46449) (#46459) 2019-09-06 16:09:09 -04:00
James Rodewig bb7bff5e30
[DOCS] Replace "// TESTRESPONSE" magic comments with "[source,console-result] (#46295) (#46418) 2019-09-06 09:22:08 -04:00
Lisa Cawley 8fdcf28fac [DOCS] Reformats API parameter details (#44194) 2019-07-12 08:28:49 -07:00
lcawl 688bf1b388 [DOCS] Fixes broken link 2019-07-04 09:13:56 -07:00
Lisa Cawley a030e3e513 [DOCS] Reformat CCR APIs to use new API format (#43952) 2019-07-04 08:29:54 -07:00
Jason Tedor b96ed1f9f7
Add note to CCR docs about mapping/alias updates
This commit adds a note to the docs clarifying that it is not possible
to manually update the mapping nor the aliases of a follower index.
2019-06-09 22:57:23 -04:00
Jason Tedor 25ca315d78
Add note to CCR docs regarding alias replication
This commit adds a note to the docs regarding the automatic replication
of aliases by a follower index from its leader index.
2019-06-09 22:55:20 -04:00
Jason Tedor 117df87b2b
Replicate aliases in cross-cluster replication (#42875)
This commit adds functionality so that aliases that are manipulated on
leader indices are replicated by the shard follow tasks to the follower
indices. Note that we ignore write indices. This is due to the fact that
follower indices do not receive direct writes so the concept is not
useful.

Relates #41815
2019-06-04 20:36:24 -04:00
James Rodewig e54e74852a [DOCS] Fix X-Pack tag for Asciidoctor (#42443) 2019-05-28 15:19:31 -04:00
Jason Tedor e596b33ce8
Remove mention of soft deletes from getting started (#40668)
We no longer need to mention soft deletes in the getting started guide
now that retention leases exist and default to 12h. This commit removes
mention of soft deletes from the getting started guide, to simplify that
content.
2019-03-31 22:11:09 -04:00
Tim Brooks b71066129b
Expand `following` documentation in ccr overview (#39936)
This commit expands the ccr overview page to include more information
about the lifecycle of following an index. It adds information linking
to the remote recovery documentation. And describes how an index can
fall-behind and how to fix it when this happens.
2019-03-21 12:19:46 -06:00
Jason Tedor 16e4499b97
Fix CCR forget follower docs example
This example was missing sample values in the forget follower API
call. This commit addresses this.
2019-03-13 10:03:22 -04:00
Martijn van Groningen 8f7ab84c5c
Add minimal docs around upgrading clusters with ccr enabled (#38037) 2019-03-13 10:11:14 +01:00
Lisa Cawley 26983d1fdf [DOCS] Replaces CCR terms with attributes (#39516) 2019-03-12 14:35:22 -07:00
Jason Tedor 0250d554b6
Introduce forget follower API (#39718)
This commit introduces the forget follower API. This API is needed in cases that
unfollowing a following index fails to remove the shard history retention leases
on the leader index. This can happen explicitly through user action, or
implicitly through an index managed by ILM. When this occurs, history will be
retained longer than necessary. While the retention lease will eventually
expire, it can be expensive to allow history to persist for that long, and also
prevent ILM from performing actions like shrink on the leader index. As such, we
introduce an API to allow for manual removal of the shard history retention
leases in this case.
2019-03-07 11:08:45 -05:00
Jason Tedor 4a3fa5ac7d
Remove beta label from CCR (#39722)
This commit removes the beta label from CCR.
2019-03-05 22:19:53 -05:00
Tim Brooks ee7c01988f
Add documentation on remote recovery (#39483)
This is related to #35975. It adds documentation on the remote recovery
process. Additionally, it adds documentation about the various settings
that can impact the process.
2019-03-05 10:17:25 -07:00
Lisa Cawley e6c2dae250 [DOCS] Fix image warnings in CCR documentation (#39430) 2019-02-27 07:37:33 -08:00
Martijn van Groningen 3865435a01
Docs test fix, wait for shards active.
(a restore needs to be complete, which happens in the background and
by default the ccr put follow api doesn't wait for this)

(this was a recent change and the pr that added this docs test,
did not include this change)

Relates to #37917
2019-01-30 11:02:16 +01:00
Martijn van Groningen e959dbaa99
Revert "Revert "Documented default values for index follow request parameters. (#37917)""
This reverts commit 7205833f92.
2019-01-30 10:49:42 +01:00
Adrien Grand 7205833f92 Revert "Documented default values for index follow request parameters. (#37917)"
This reverts commit 4da7a44648.
2019-01-30 10:48:01 +01:00
Martijn van Groningen 4da7a44648
Documented default values for index follow request parameters. (#37917) 2019-01-30 09:37:41 +01:00
Tim Brooks 00ace369af
Use `CcrRepository` to init follower index (#35719)
This commit modifies the put follow index action to use a
CcrRepository when creating a follower index. It routes 
the logic through the snapshot/restore process. A 
wait_for_active_shards parameter can be used to configure
how long to wait before returning the response.
2019-01-29 11:47:29 -07:00
Martijn van Groningen 6846666b6b
Add ccr follow info api (#37408)
* Add ccr follow info api

This api returns all follower indices and per follower index
the provided parameters at put follow / resume follow time and
whether index following is paused or active.

Closes #37127

* iter

* [DOCS] Edits the get follower info API

* [DOCS] Fixes link to remote cluster

* [DOCS] Clarifies descriptions for configured parameters
2019-01-18 16:37:21 +01:00
Christoph Büscher 25aac4f77f
Remove `include_type_name` in asciidoc where possible (#37568)
The "include_type_name" parameter was temporarily introduced in #37285 to facilitate
moving the default parameter setting to "false" in many places in the documentation
code snippets. Most of the places can simply be reverted without causing errors.
In this change I looked for asciidoc files that contained the
"include_type_name=true" addition when creating new indices but didn't look
likey they made use of the "_doc" type for mappings. This is mostly the case
e.g. in the analysis docs where index creating often only contains settings. I
manually corrected the use of types in some places where the docs still used an
explicit type name and not the dummy "_doc" type.
2019-01-18 09:34:11 +01:00
Lisa Cawley 03cacdf16e
[DOCS] Adds CCR screenshots (#37439) 2019-01-15 10:53:29 -08:00
Julie Tibshirani 36a3b84fc9
Update the default for include_type_name to false. (#37285)
* Default include_type_name to false for get and put mappings.

* Default include_type_name to false for get field mappings.

* Add a constant for the default include_type_name value.

* Default include_type_name to false for get and put index templates.

* Default include_type_name to false for create index.

* Update create index calls in REST documentation to use include_type_name=true.

* Some minor clean-ups around the get index API.

* In REST tests, use include_type_name=true by default for index creation.

* Make sure to use 'expression == false'.

* Clarify the different IndexTemplateMetaData toXContent methods.

* Fix FullClusterRestartIT#testSnapshotRestore.

* Fix the ml_anomalies_default_mappings test.

* Fix GetFieldMappingsResponseTests and GetIndexTemplateResponseTests.

We make sure to specify include_type_name=true during xContent parsing,
so we continue to test the legacy typed responses. XContent generation
for the typeless responses is currently only covered by REST tests,
but we will be adding unit test coverage for these as we implement
each typeless API in the Java HLRC.

This commit also refactors GetMappingsResponse to follow the same appraoch
as the other mappings-related responses, where we read include_type_name
out of the xContent params, instead of creating a second toXContent method.
This gives better consistency in the response parsing code.

* Fix more REST tests.

* Improve some wording in the create index documentation.

* Add a note about types removal in the create index docs.

* Fix SmokeTestMonitoringWithSecurityIT#testHTTPExporterWithSSL.

* Make sure to mention include_type_name in the REST docs for affected APIs.

* Make sure to use 'expression == false' in FullClusterRestartIT.

* Mention include_type_name in the REST templates docs.
2019-01-14 13:08:01 -08:00
Josh Soref edb48321ba [DOCS] Various spelling corrections (#37046) 2019-01-07 14:44:12 +01:00
lcawl 32bed098bb [DOCS] Synchs titles of X-Pack APIs 2018-12-20 10:27:24 -08:00
Martijn van Groningen a181a25226
[CCR] Add time since last auto follow fetch to auto follow stats (#36542)
For each remote cluster the auto follow coordinator, starts an auto
follower that checks the remote cluster state and determines whether an
index needs to be auto followed. The time since last auto follow is
reported per remote cluster and gives insight whether the auto follow
process is alive.

Relates to #33007
Originates from #35895
2018-12-17 14:14:56 +01:00
Jason Tedor 692cff830a
Add guidance on using CCR with Logstash (#36609)
* Add guidance on using CCR with Logstash

This commit adds a note to the documentation regarding how to configure
Logstash indices in the context of being available as leader indices for
cross-cluster replication.

* Oh okay

* idk

* notconsole
2018-12-13 16:14:59 -05:00
Nhat Nguyen 51800de2a8
Enable soft-deletes by default on 7.0.0 or later (#36141)
This change enables soft-deletes by default on ES 7.0.0 or later.

Relates #33222

Co-authored-by: Jason Tedor <jason@tedor.me>
2018-12-11 18:58:49 -05:00
Jason Tedor d1184cfb68
Add docs on replicating APM Server or Beats indices (#36333)
This commit adds a brief note to the documentation on how to manage the
index templates that are used to create APM Server and Beats indices.
2018-12-06 16:07:40 -05:00
Martijn van Groningen b9707c29a1
[CCR] Change get autofollow patterns API response format (#36203)
The current response format is:

```
{
    "pattern1": {
        ...
    },
    "pattern2": {
        ...
    }
}
```

The new format is:

```
{
    "patterns": [
        {
            "name": "pattern1",
            "pattern": {
                ...
            }
        },
        {
            "name": "pattern2",
            "pattern": {
                ...
            }
        }
    ]
}
```

This format is more structured and more friendly for parsing and generating specs.
This is a breaking change, but it is better to do this now while ccr
is still a beta feature than later.

Follow up from #36049
2018-12-05 08:41:27 +01:00
Martijn van Groningen 96a741f2c2
[TEST] escape brackets
Relates to #35496
2018-11-22 14:58:42 +01:00
Lisa Cawley 78209188bc
[DOCS] Adds more authorization info for CCR APIs (#35606) 2018-11-21 15:01:59 -08:00
lcawl fa6d8a5004 [DOCS] Fixes navtitle for CCR API 2018-11-20 17:31:01 -08:00
Lisa Cawley 04a087fe2f
[DOCS] Adds authorization info for CCR APIs (#35557) 2018-11-20 16:23:01 -08:00
Jason Tedor 220c175484
Provide links to auto-follow docs (#35674)
This commit adds a link to the auto-follow docs from the CCR getting
started docs and the relevant CCR APIs.
2018-11-19 20:40:58 -05:00
Martijn van Groningen 797cffbb68
[TEST] Replace fields in response with actual values
Relates to #35496
2018-11-16 10:18:14 +01:00
lcawl 2ac4ef7a69 [DOCS] Fixes broken link 2018-11-13 10:04:26 -08:00