Commit graph

47 commits

Author SHA1 Message Date
James Rodewig
bfae8c7633
[DOCS] Fix typo in CCR Put Follow API docs (#61392) (#61471)
Co-authored-by: Mark Laney <mark1@elastic.co>
2020-08-24 09:46:32 -04:00
James Rodewig
2774cd6938
[DOCS] Swap [float] for [discrete] (#60124)
Changes instances of `[float]` in our docs for `[discrete]`.

Asciidoctor prefers the `[discrete]` tag for floating headings:
https://asciidoctor.org/docs/asciidoc-asciidoctor-diffs/#blocks
2020-07-23 11:48:22 -04:00
James Rodewig
80b674fb25
[DOCS] Reformat snippets to use two-space indents (#59973) 2020-07-21 12:24:26 -04:00
Jason Tedor
2e0274266f
Allow follower indices to override leader settings (#58103)
Today when creating a follower index via the put follow API, or via an
auto-follow pattern, it is not possible to specify settings overrides
for the follower index. Instead, we copy all of the leader index
settings to the follower. Yet, there are cases where a user would want
some different settings on the follower index such as the number of
replicas, or allocation settings. This commit addresses this by allowing
the user to specify settings overrides when creating follower index via
manual put follower calls, or via auto-follow patterns. Note that not
all settings can be overrode (e.g., index.number_of_shards) so we also
have detection that prevents attempting to override settings that must
be equal between the leader and follow index. Note that we do not even
allow specifying such settings in the overrides, even if they are
specified to be equal between the leader and the follower
index. Instead, the must be implicitly copied from the leader index, not
explicitly set by the user.
2020-06-18 10:55:17 -04:00
CJ Cenizal
cde5126620
[Docs] Clarify that _ccr/info omits parameters from the response when the follower index is paused. (#55961) 2020-05-12 15:09:40 -07:00
Lisa Cawley
da531f4cf6
[DOCS] Collapse nested objects in CCR APIs (#54697) 2020-04-03 11:58:25 -07:00
Yannick Welsch
be849b2a4d
Hide orphaned tasks from follower stats (#48901)
CCR follower stats can return information for persistent tasks that are in the process of being cleaned up. This is problematic for tests where CCR follower indices have been deleted, but their persistent follower task is only cleaned up asynchronously afterwards. If one of the following tests then accesses the follower stats, it might still get the stats for that follower task.

In addition, some tests were not cleaning up their auto-follow patterns, leaving orphaned patterns behind. Other tests cleaned up their auto-follow patterns. As always the same name was used, it just depended on the test execution order whether this led to a failure or not. This commit fixes the offensive tests, and will also automatically remove auto-follow-patterns at the end of tests, like we do for many other features.

Closes #48700
2019-11-08 00:01:54 -05:00
Yannick Welsch
237e3f0755 Revert "Mute get-ccr-stats doctest (#48375)"
This reverts commit f861927e8b.
2019-10-30 11:12:25 +01:00
Alan Woodward
f861927e8b
Mute get-ccr-stats doctest (#48375)
This test is failing frequently, due to #47718
2019-10-23 15:19:44 +01:00
Tanguy Leroux
58ca9eeb02
Add documentation for Pause/Resume Auto-Follower APIs (#47985)
Relates #47510

Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
2019-10-15 08:24:51 +02:00
Tanguy Leroux
8b82e62ec2
Add Pause/Resume Auto Follower APIs (#47510)
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 committ 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.
2019-10-11 12:33:47 +02:00
Lisa Cawley
4e4990c6a0
[DOCS] Cleans up links to security content (#47610) 2019-10-04 16:10:26 -07:00
James Rodewig
5772c1c7dd
[DOCS] [2 of 5] Change // CONSOLE comments to [source,console] (#46353) 2019-09-09 13:13:41 -04:00
James Rodewig
e43be90e6c
[DOCS] [5 of 5] Change // TESTRESPONSE comments to [source,console-results] (#46449) 2019-09-06 14:05:36 -04:00
James Rodewig
466c59a4a7
[DOCS] Replace "// TESTRESPONSE" magic comments with "[source,console-result] (#46295) 2019-09-05 16:47:18 -04:00
Lisa Cawley
b3a7b2221b
[DOCS] Reformats API parameter details (#44194) 2019-07-12 08:26:31 -07:00
lcawl
4e53fd04a0 [DOCS] Fixes broken link 2019-07-04 09:13:00 -07:00
Lisa Cawley
19dbeda54f
[DOCS] Reformat CCR APIs to use new API format (#43952) 2019-07-04 08:22:17 -07:00
Jason Tedor
6a98eebeef
Replicate aliases in cross-cluster replication (#41815)
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.
2019-06-04 16:44:14 -04:00
James Rodewig
aad6cc4241
[DOCS] Fix X-Pack tag for Asciidoctor (#42443) 2019-05-28 15:18:51 -04:00
Jason Tedor
97fa1267dc
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:02:17 -04:00
Lisa Cawley
43065ea536
[DOCS] Replaces CCR terms with attributes (#39516) 2019-03-12 14:27:17 -07:00
Jason Tedor
8c156ed47c
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 10:29:10 -05:00
Jason Tedor
669d1937c4
Remove beta label from CCR (#39722)
This commit removes the beta label from CCR.
2019-03-05 22:19:19 -05: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
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
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
Jason Tedor
326b238852
Add docs for CCR stats API (#35439)
This commit adds API docs for the CCR stats endpoint.
2018-11-12 10:28:35 -05:00
Jason Tedor
d84ff3765d
Mark CCR as beta in the docs
This commit marks CCR as beta in the docs. This beta label is applied to
all CCR pages.
2018-11-10 14:38:22 -05:00
Jason Tedor
4f4fc3b8f8
Replicate index settings to followers (#35089)
This commit uses the index settings version so that a follower can
replicate index settings changes as needed from the leader.

Co-authored-by: Martijn van Groningen <martijn.v.groningen@gmail.com>
2018-11-07 21:20:51 -05:00
Jason Tedor
26f5c509af
Fix CCR API specification (#34963)
This commit fixes two issues with the CCR API specification:
 - remove the CCR stats endpoint, it is not currently implemented
 - fix the documentation links
2018-10-29 09:37:13 -04:00
Martijn van Groningen
f13d529448
Fixed ccr docs broken links. 2018-10-29 09:29:28 +01:00
Martijn van Groningen
1801518527
[CCR] Refactor stats APIs (#34912)
* Changed the auto follow stats to also include follow stats.
* Renamed the auto follow stats api to stats api and changed its url path
  from `/_ccr/auto_follow/stats` `/_ccr/stats`.
* Removed `/_ccr/stats` url path for the follow stats api, which makes
  the index parameter a required parameter.
* Fixed docs.
2018-10-29 07:45:27 +01:00
Jason Tedor
fdfdbe486d
Introduce cross-cluster replication API docs (#34726)
This commit is our first introduction to cross-cluster replication
docs. In this commit, we introduce the cross-cluster replication API
docs. We also add skelton docs for additional content that will be added
in a series of follow-up commits.
2018-10-26 11:23:35 -04:00