[9.4] [StorageIndexAdapter] Set auto_expand_replicas to fix yellow health on single-node ES clusters (#263096)#264262
Merged
kibanamachine merged 1 commit intoelastic:9.4from Apr 18, 2026
Conversation
…n single-node ES clusters (elastic#263096) ## Summary Fixes elastic#263048 `StorageIndexAdapter` did not include index settings in its template, causing all 24 managed indices (`.kibana_streams`, `.chat-conversations`, `kibana-evaluation-datasets`, etc.) to default to `number_of_replicas: 1`. On single-node Elasticsearch clusters, the replica shard cannot be allocated, leaving cluster health yellow indefinitely. This is the same class of issue as elastic#261933 (`.workflows-events`), but affecting all indices managed by `StorageIndexAdapter`. ### Changes - Added `settings: { auto_expand_replicas: '0-1', number_of_shards: 1 }` to the index template in `createOrUpdateIndexTemplate()` — this is the standard pattern used by all other Kibana system indices (`.kibana`, `.kibana_task_manager`, event log, lock manager, blob storage, etc.) - Added `updateSettingsOfExistingIndex()` method that checks the current `auto_expand_replicas` value on an existing write index and updates it to `'0-1'` if it differs — this fixes existing deployments that already have indices with `number_of_replicas: 1` - Wired `updateSettingsOfExistingIndex()` into `validateComponentsBeforeWriting()` so it runs on every write to an existing index ### Affected indices (all 24 automatically benefit) | Plugin | Indices | |--------|---------| | streams (10) | `.chat-memory`, `.chat-memhistory`, `.kibana_streams`, `.kibana_streams_settings`, `.kibana_streams_features`, `.kibana_streams_assets`, `.kibana_streams_attachments`, `.kibana_streams_insights`, `.kibana_streams_tasks`, `.kibana_streams_content_packs` | | agent_builder (10) | `.chat-conversations`, `.chat-skills`, `.chat-tools`, `.chat-tool-health`, `.chat-plugins`, `.chat-agent-executions`, `.chat-agents`, `.chat-sml-data`, `.chat-sml-crawler-state`, `.chat-user-prompts` | | evals (2) | `kibana-evaluation-datasets`, `kibana-evaluation-dataset-examples` | | automatic_import (1) | `.kibana-automatic-import-samples` | | workflows_management (1) | `.workflows-workflows` | ### Test plan - [x] Unit tests: 9 passing (3 new tests for template settings, settings update, and no-op when already correct) - [x] Integration tests: 20 passing (1 new test verifying existing index gets `auto_expand_replicas` updated on next write) - [x] Type check passes --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit b805e2e)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backport
This will backport the following commits from
mainto9.4:Questions ?
Please refer to the Backport tool documentation