Skip to content

Report Deprecated Indices That Are Flagged To Ignore Migration Reindex As A Warning #120629

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

Merged

Conversation

lukewhiting
Copy link
Contributor

Adds a new deprecation at WARNING vs CRITICAL level when a user has an index which will become unwritable in the next version and they have marked that index as OK to be ignored for reindexing and become read only after upgrade.

This allows users to keep track of which indices they have marked to be ignored in the Kibana migration assistant.

Fixes ES-10578

@lukewhiting lukewhiting added :Data Management/Data streams Data streams and their lifecycles auto-backport Automatically create backport pull requests when merged v9.0.0 v8.18.0 labels Jan 22, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Jan 22, 2025
@lukewhiting
Copy link
Contributor Author

Pinging @henningandersen as he originally proposed this functionality

@elasticsearchmachine
Copy link
Collaborator

Hi @lukewhiting, I've created a changelog YAML for you.

Copy link
Member

@masseyke masseyke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lukewhiting lukewhiting enabled auto-merge (squash) January 23, 2025 09:18
Copy link
Contributor

@henningandersen henningandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

left a few comments. Did not review tests, assuming others do.

"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-9.0.html",
"This index has version: "
+ currentCompatibilityVersion.toReleaseVersion()
+ " and has been marked as OK to become read-only after upgrade",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is already read-only, can we reflect that in the message?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have changed "become" to "remain". Still not 100% sure it's right... I want to try and capture these facts:

  • The index isn't writable after upgrade
  • It's currently read only
  • The user had taken affirmative action to say this scenario is OK

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably prefer to avoid the last bit. Perhaps just say it is read-only and will be supported as read-only in 9?

Copy link
Contributor Author

@lukewhiting lukewhiting Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like:

This read only index has version: 7.0 and will be supported only as read only in 9.0?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks.

@lukewhiting lukewhiting merged commit 45ae071 into elastic:main Jan 23, 2025
16 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 120629

elasticsearchmachine pushed a commit that referenced this pull request Jan 23, 2025
…Reinde… (#120709)

* Report Deprecated Indices That Are Flagged To Ignore Migration Reindex As A Warning (#120629)

* Add block state matching option to deprecation check predicate

* Add new deprecation checks to warn on old indices with ignore reindex flag

* Test for new deprecation checks

* Update docs/changelog/120629.yaml

* PR Changes - Remove leftover comment that's no longer true

(cherry picked from commit 45ae071)

* Update notice wording for 8.x
@lukewhiting lukewhiting deleted the es-10578-report-ignored-ds-as-warn branch January 23, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged backport pending :Data Management/Data streams Data streams and their lifecycles >enhancement Team:Data Management Meta label for data/management team v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants