Skip to content
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

Watcher Template Registry attempts putting policy when ILM is disabled #38805

Closed
talevy opened this issue Feb 12, 2019 · 2 comments · Fixed by #39325
Closed

Watcher Template Registry attempts putting policy when ILM is disabled #38805

talevy opened this issue Feb 12, 2019 · 2 comments · Fixed by #39325

Comments

@talevy
Copy link
Contributor

talevy commented Feb 12, 2019

Watcher bootstraps its template/ILM-policy at startup.
Even when ILM is disabled, it attempts to insert its policy.
This will fail because ILM endpoints are not registered when
ILM is disabled.

Here is a stack tracing the issue:

java.lang.IllegalStateException: failed to find action [org.elasticsearch.xpack.core.indexlifecycle.action.PutLifecycleAction@d06806ea] to execute
        at org.elasticsearch.client.node.NodeClient.transportAction(NodeClient.java:116) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
        at org.elasticsearch.client.node.NodeClient.executeLocally(NodeClient.java:83) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
        at org.elasticsearch.client.node.NodeClient.doExecute(NodeClient.java:72) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
        at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:393) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
        at org.elasticsearch.xpack.core.indexlifecycle.client.ILMClient.putLifecyclePolicy(ILMClient.java:42) ~[?:?]
        at org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistry.lambda$putPolicy$3(WatcherIndexTemplateRegistry.java:188) ~[?:?]
        at org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin(ClientHelper.java:82) ~[?:?]
        at org.elasticsearch.xpack.watcher.support.WatcherIndexTemplateRegistry.lambda$putPolicy$4(WatcherIndexTemplateRegistry.java:171) ~[?:?]
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

@hendrikmuhs
Copy link

Note: Monitoring integration tests use a LocalStateMonitoring plugin which adds Watcher to the plugins it loads for the test. This has the same problem: Watcher but no ILM. The log is full of errors although the tests run fine which is questionable. Would be good if this runs clean again:

./gradlew :x-pack:plugin:monitoring:internalClusterTest -Dtests.class=org.elasticsearch.xpack.monitoring.integration.MonitoringIT

dakrone added a commit to dakrone/elasticsearch that referenced this issue Feb 21, 2019
Without this, when creating the watch history indices they complain about there
being no such setting as `index.lifecycle.name`.

Relates to elastic#38805
dakrone added a commit that referenced this issue Feb 22, 2019
Without this, when creating the watch history indices they complain about there
being no such setting as `index.lifecycle.name`.

Relates to #38805
dakrone added a commit that referenced this issue Feb 22, 2019
Without this, when creating the watch history indices they complain about there
being no such setting as `index.lifecycle.name`.

Relates to #38805
dakrone added a commit that referenced this issue Feb 22, 2019
Without this, when creating the watch history indices they complain about there
being no such setting as `index.lifecycle.name`.

Relates to #38805
weizijun pushed a commit to weizijun/elasticsearch that referenced this issue Feb 22, 2019
Without this, when creating the watch history indices they complain about there
being no such setting as `index.lifecycle.name`.

Relates to elastic#38805
weizijun pushed a commit to weizijun/elasticsearch that referenced this issue Feb 22, 2019
Without this, when creating the watch history indices they complain about there
being no such setting as `index.lifecycle.name`.

Relates to elastic#38805
dakrone added a commit to dakrone/elasticsearch that referenced this issue Feb 22, 2019
When ILM is disabled and Watcher is setting up the templates and policies for
the watch history indices, it will now use a template that does not have the
`index.lifecycle.name` setting, so that indices are not created with the
setting.

This also adds tests for the behavior, and changes the cluster state used in
these tests to be real instead of mocked.

Resolves elastic#38805
dakrone added a commit that referenced this issue Feb 26, 2019
…#39325)

When ILM is disabled and Watcher is setting up the templates and policies for
the watch history indices, it will now use a template that does not have the
`index.lifecycle.name` setting, so that indices are not created with the
setting.

This also adds tests for the behavior, and changes the cluster state used in
these tests to be real instead of mocked.

Resolves #38805
dakrone added a commit to dakrone/elasticsearch that referenced this issue Feb 26, 2019
…elastic#39325)

When ILM is disabled and Watcher is setting up the templates and policies for
the watch history indices, it will now use a template that does not have the
`index.lifecycle.name` setting, so that indices are not created with the
setting.

This also adds tests for the behavior, and changes the cluster state used in
these tests to be real instead of mocked.

Resolves elastic#38805
dakrone added a commit to dakrone/elasticsearch that referenced this issue Feb 26, 2019
…elastic#39325)

When ILM is disabled and Watcher is setting up the templates and policies for
the watch history indices, it will now use a template that does not have the
`index.lifecycle.name` setting, so that indices are not created with the
setting.

This also adds tests for the behavior, and changes the cluster state used in
these tests to be real instead of mocked.

Resolves elastic#38805
dakrone added a commit that referenced this issue Feb 27, 2019
…#39420)

Backport of #39325

When ILM is disabled and Watcher is setting up the templates and policies for
the watch history indices, it will now use a template that does not have the
`index.lifecycle.name` setting, so that indices are not created with the
setting.

This also adds tests for the behavior, and changes the cluster state used in
these tests to be real instead of mocked.

Resolves #38805
dakrone added a commit that referenced this issue Feb 27, 2019
…#39421)

Backport of #39325

When ILM is disabled and Watcher is setting up the templates and policies for
the watch history indices, it will now use a template that does not have the
`index.lifecycle.name` setting, so that indices are not created with the
setting.

This also adds tests for the behavior, and changes the cluster state used in
these tests to be real instead of mocked.

Resolves #38805
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants