[8.15] Add changelog for fallback to ILM if DSL not present (backport #13918) #13979
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation/summary
APM-Server switched from Index Lifecycle Management(ILM) to Datastream Lifecycle (DSL) in v8.15.0. This switch was done when we moved from APM integration (which used ILM) to APM-data plugin (which uses DSL) in ES for managing APM datastreams. As a result of the switch, any old datastreams created before the switch would be
Unmanaged
because the datastream will never be updated with the DSL lifecycle -- this has to be done manually by using the PUT API.Checklist
How to test these changes
Create a stack (ES, Kibana, APM-Server) with data-persistence enabled for ES using
8.14.3
version. We use the8.14.3
as that is the latest available version which uses APM integration package and thus configures ILM policies.Example docker-compose.yaml
Install the APM integration in the cluster.
Send some data, for example: by using apmsoak. Example command:
go run ./cmd/apmsoak/ run --file cmd/apmsoak/scenarios.yml --scenario apm-server --server-url http://localhost:8200
Assert that the APM indices created are managed by ILM, for example: by running
GET /_data_stream/traces-apm-default
to check for trace indicesBuild an Elasticsearch docker image using the branch in this PR:
./gradlew buildAarch64DockerImage
Update the versions used in the stack created in step 1 to
8.16.0-SNAPSHOT
, for ES use the docker image built in step 5Send some more data as we did in step 3
Assert that all the APM indices are still managed by ILM
Rollover the datastream
Assert that all the APM indices, including the one created using rollover in step 9, are still managed by ILM
Also, test if the setup works by itself i.e. if a cluster is created using the latest version (with the changes in the PR) then it works as expected and the created APM indices in this case are managed by DSL (datastream lifecycle).
NOTE: Any indices created when APM is on version
8.15.0
and datastream created before8.15.0
i.e. with ILM, will remainUnmanaged
even after this fix. To fix them, we would need to explicitly update them OR use the PUT API on datastream to set DSL.Related issues
8.15.0
are without lifecycle policies #13898Unmanaged
on upgrade elasticsearch#112137This is an automatic backport of pull request #13918 done by [Mergify](https://mergify.com).