apm-server icon indicating copy to clipboard operation
apm-server copied to clipboard

Automatically migrate default ILM policy to Data Stream Lifecycle Management

Open axw opened this issue 1 year ago • 4 comments

In 8.15.0 we enable the apm-data plugin by default in Elasticsearch, which ships index templates that make use of data stream lifecycle by default. It is still possible to opt into ILM (except in Serverless projects, which do not support ILM).

There was a bug in 8.15.0 that we fixed in 8.15.1 (https://github.com/elastic/apm-server/issues/13898): data streams upgraded from older versions would be "unmanaged" on upgrade. Data stream lifecycle is only automatically configured on newly data streams, so we need to keep some ILM configuration for existing data streams.

This leaves us in an indefinite undesirable state:

  • new data streams use data stream lifecycle
  • old data streams use ILM, unless manually migrated

We should automatically migrate existing data streams from ILM to data stream lifecycle management when the existing data streams use the default ILM policy. The retention durations are aligned, and the default ILM policy does not use any advanced functionality (e.g. hot/warm/cold tiering), so this should be considered a non-breaking change.

axw avatar Sep 20 '24 03:09 axw

It's not really an enhancement, it's more of a bug -- how do i migrate this myself? none of the tracing stuff works anymore in our instances... (we are spending 25k a year on them, and they no longer work)

pilsy avatar Sep 24 '24 02:09 pilsy

@pilsy which part's a bug? There's definitely a bug in 8.15.0, for which there's a fix in 8.15.1: https://github.com/elastic/apm-server/issues/13898

Is there something else affecting you too?

axw avatar Sep 24 '24 02:09 axw

@axw support eventually reached out and helped me fix the problem, basically when the cluster was upgraded to 8.15.0 all tracing, logging and metrics stopped displaying in the interface, even tho the data was still being ingested... and a simple upgrade to 8.15.1 did not automagically fix it.

pilsy avatar Oct 15 '24 07:10 pilsy

@pilsy thanks, I will follow up on the support case and see what else we can/need to do. Sorry about the trouble this caused you.

EDIT: I see the resolution was to force a rollover to the data streams. This is related to https://github.com/elastic/elasticsearch/issues/112781

axw avatar Oct 15 '24 07:10 axw

It has been decided to keep ILM for 9.0. Closing this.

kruskall avatar Dec 23 '24 09:12 kruskall