-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When CCR disallow auto follow leader system indices should show error #81238
Comments
Pinging @elastic/es-distributed (Team:Distributed) |
I just encountered exactly the same issue, but for a different category of indices where CCR failed to report an error at the time when setting up auto_follow for searchable snapshot indices. Prerequisite
PUT _cluster/settings
{
"cluster": {
"remote": {
"ccr1": { <-- the alias used for the leader cluster
"mode": "proxy",
"skip_unavailable": "false",
"server_name": "xxx.us-central1.gcp.foundit.no", <-- leader cluster endpoint
"proxy_socket_connections": "18",
"proxy_address": "xxx.us-central1.gcp.foundit.no:9400" <-- leader cluster endpoint
}
}
}
} Expected behaviour (When using ccr/follow)We noticed that when replicating a cold
Unexpected behaviour (when using with ccr/auto_follow)However, if I use ### On the follower cluster
PUT /_ccr/auto_follow/timeseries_pattern
{
"remote_cluster" : "ccr1",
"leader_index_patterns" :
[
"restored-timeseries*"
],
"follow_index_pattern" : "{{leader_index}}-copy"
}
----
{
"acknowledged": true <-- I don't want this, I want to see error here.
} It's possible for me to find out that the above
|
I think it works as expected: the auto-follow pattern is not validated using the leader cluster metadata at creation time and as such it is not possible to return an immediate error. The auto-follow API works as a separate process that picks up new indices to follow and as such does not work as a synchronous API like Put Follow where you can expect an immediate success/error response. We could introduce some kind of validation with the remote cluster metadata when an auto-follow pattern is created but it looks contrary to the asynchronous, separate nature of auto-following. The validation could pass at creation time but the user will have to look at CCR stats to investigate any issues in auto-following anyway. I wonder if we should instead make CCR auto-following failures more easily discoverable (through Cluster Health API?) |
Elasticsearch version (
bin/elasticsearch --version
): 8.0.0-beta1Plugins installed: []
JVM version (
java -version
):OS version (
uname -a
if on a Unix-like system):Description of the problem including expected versus actual behavior:
From #72815 where it disallows CCR to auto follow leader system indices.
This is fine, except that one can still use the API or Kibana UI to create auto follow pattern which contains system indices.
Internally, Elasticsearch prevents system indices getting replicated, but there's no error message associated with the API or UI makes user unable to figure out why system indices were not replicated.
Steps to reproduce:
.kibana_8.0.0_001
.auto_follow
pattern on clusterA specify leader system indices from clusterB:--> Expected behavior is that an error message should appear saying
.kibana_8.0.0_001
is a system index so that the operation will not succeed.--> Reality is that it returns the following as if this was accepted.
The text was updated successfully, but these errors were encountered: