Security index is created with custom mappings/settings resulting in upgrade issues #87827
Labels
>bug
:Core/Infra/Core
Core issues without another label
Team:Core/Infra
Meta label for core/infra team
team-discuss
Elasticsearch Version
7.17.4
Installed Plugins
No response
Java Version
bundled
OS Version
Deployment in ESS
Problem Description
1. Problem
This has been observed in Elasticsearch Service (ESS) and can be reproduced with the steps provided below.
User upgrades from version 7.17.4 to version 8.2.x and the Kibana upgrade fails with the following error message:
.security
index was created with custom mappings/settings:*
or.*
) and applied custom mappings/settings.migrate system indices
) while these legacy index templates were in place.2. Workaround
Reindexing
.security-6-reindexed-for-8
into a new index (e.g.security-7-reindexed-for-8
) is the only workaround. However, depending on the setup, steps vary.2.1 On-premise setup (self-managed)
(Recommended but optional) : take a snapshot
In each Elasticsearch node, add the below role definition in the
roles.yml
file:is_hidden
property on the existing.security
alias:.security-6-reindexed-for-8
into a new index.security-7-reindexed-for-8
.security-7-reindexed-for-8
and verify the presence of_meta
field.a) Delete the old security index:
b) In each Elasticsearch node, delete the file-based user:
c) In each Elasticsearch node, remove the
system-indices-admin
role definition in theroles.yml
file.2.2 Elastic Cloud Enterprise / Elasticsearch Service
a) Set the
is_hidden
property on the existing.security
alias:b) Reindex
.security-6-reindexed-for-8
in a new index.security-7-reindexed-for-8
c) Check the mappings for
.security-7-reindexed-for-8
and verify the presence of_meta
field.d) If the reindexing operation succeeded, delete the old security index:
3. Related issues
It is in a way similar to #86801 with the below pull requests that should address and prevent this kind of scenarios:
Can we take a second look at this scenario and ensure that the above pull requests cover it?
4. Steps to Reproduce
Create a cluster version 6.8.23
Upgrade to version 7.17.4
Install the following legacy templates:
Go to Kibana Upgrade Assistant and click
migrate system indices
Check the Elasticsearch logs:
a)
.security-6-reindexed-for-8
was created with the 3 above templates applied to it:b) Shortly after, the following messages can be observed:
a) Elasticsearch upgrade succeeds but Kibana upgrade fails with the following error in the Cloud UI:
b) User can observe the below error message in the Kibana logs:
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: