Retry transient errors on agents search#243105
Merged
MichelLosier merged 3 commits intoelastic:mainfrom Nov 17, 2025
Merged
Conversation
Contributor
|
Pinging @elastic/fleet (Team:Fleet) |
Member
|
Should we wrap all the call to |
e2ff26b to
3a6cfa4
Compare
Contributor
💚 Build Succeeded
Metrics [docs]
History
|
Contributor
|
Starting backport for target branches: 8.19, 9.1, 9.2 |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Nov 17, 2025
Partially resolves: elastic#243098 We can sometimes get a `no_shard_available_action_exception` when searching agents on `/api/fleet/agents` while awaiting the first agent to be enrolled in fleet, and for the `.fleet-agents` index to exist. This PR mitigates this issue by adding retries on transient ES errors. ## Release notes * Adds retry behavior for `/api/fleet/agents` endpoints when transient issues with ES are encountered. (cherry picked from commit 2d89709)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Nov 17, 2025
Partially resolves: elastic#243098 We can sometimes get a `no_shard_available_action_exception` when searching agents on `/api/fleet/agents` while awaiting the first agent to be enrolled in fleet, and for the `.fleet-agents` index to exist. This PR mitigates this issue by adding retries on transient ES errors. ## Release notes * Adds retry behavior for `/api/fleet/agents` endpoints when transient issues with ES are encountered. (cherry picked from commit 2d89709)
Contributor
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
Contributor
Author
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
MichelLosier
added a commit
to MichelLosier/kibana
that referenced
this pull request
Nov 17, 2025
Partially resolves: elastic#243098 We can sometimes get a `no_shard_available_action_exception` when searching agents on `/api/fleet/agents` while awaiting the first agent to be enrolled in fleet, and for the `.fleet-agents` index to exist. This PR mitigates this issue by adding retries on transient ES errors. ## Release notes * Adds retry behavior for `/api/fleet/agents` endpoints when transient issues with ES are encountered. (cherry picked from commit 2d89709) # Conflicts: # x-pack/platform/plugins/shared/fleet/server/services/agents/crud.ts
kibanamachine
added a commit
that referenced
this pull request
Nov 17, 2025
# Backport This will backport the following commits from `main` to `9.2`: - [Retry transient errors on agents search (#243105)](#243105) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Michel Losier","email":"michel.losier@elastic.co"},"sourceCommit":{"committedDate":"2025-11-17T19:29:16Z","message":"Retry transient errors on agents search (#243105)\n\nPartially resolves: https://github.com/elastic/kibana/issues/243098\n\nWe can sometimes get a `no_shard_available_action_exception` when\nsearching agents on `/api/fleet/agents` while awaiting the first agent\nto be enrolled in fleet, and for the `.fleet-agents` index to exist.\n\nThis PR mitigates this issue by adding retries on transient ES errors.\n\n## Release notes\n\n* Adds retry behavior for `/api/fleet/agents` endpoints when transient issues with\nES are encountered.","sha":"2d8970911411a579a2fb77b44cb6418da9cbcc64","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:version","v9.3.0","v8.19.8","v9.2.2","v9.1.8"],"title":"Retry transient errors on agents search","number":243105,"url":"https://github.com/elastic/kibana/pull/243105","mergeCommit":{"message":"Retry transient errors on agents search (#243105)\n\nPartially resolves: https://github.com/elastic/kibana/issues/243098\n\nWe can sometimes get a `no_shard_available_action_exception` when\nsearching agents on `/api/fleet/agents` while awaiting the first agent\nto be enrolled in fleet, and for the `.fleet-agents` index to exist.\n\nThis PR mitigates this issue by adding retries on transient ES errors.\n\n## Release notes\n\n* Adds retry behavior for `/api/fleet/agents` endpoints when transient issues with\nES are encountered.","sha":"2d8970911411a579a2fb77b44cb6418da9cbcc64"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.2","9.1"],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/243105","number":243105,"mergeCommit":{"message":"Retry transient errors on agents search (#243105)\n\nPartially resolves: https://github.com/elastic/kibana/issues/243098\n\nWe can sometimes get a `no_shard_available_action_exception` when\nsearching agents on `/api/fleet/agents` while awaiting the first agent\nto be enrolled in fleet, and for the `.fleet-agents` index to exist.\n\nThis PR mitigates this issue by adding retries on transient ES errors.\n\n## Release notes\n\n* Adds retry behavior for `/api/fleet/agents` endpoints when transient issues with\nES are encountered.","sha":"2d8970911411a579a2fb77b44cb6418da9cbcc64"}},{"branch":"8.19","label":"v8.19.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Michel Losier <michel.losier@elastic.co>
kibanamachine
added a commit
that referenced
this pull request
Nov 17, 2025
# Backport This will backport the following commits from `main` to `9.1`: - [Retry transient errors on agents search (#243105)](#243105) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Michel Losier","email":"michel.losier@elastic.co"},"sourceCommit":{"committedDate":"2025-11-17T19:29:16Z","message":"Retry transient errors on agents search (#243105)\n\nPartially resolves: https://github.com/elastic/kibana/issues/243098\n\nWe can sometimes get a `no_shard_available_action_exception` when\nsearching agents on `/api/fleet/agents` while awaiting the first agent\nto be enrolled in fleet, and for the `.fleet-agents` index to exist.\n\nThis PR mitigates this issue by adding retries on transient ES errors.\n\n## Release notes\n\n* Adds retry behavior for `/api/fleet/agents` endpoints when transient issues with\nES are encountered.","sha":"2d8970911411a579a2fb77b44cb6418da9cbcc64","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:version","v9.3.0","v8.19.8","v9.2.2","v9.1.8"],"title":"Retry transient errors on agents search","number":243105,"url":"https://github.com/elastic/kibana/pull/243105","mergeCommit":{"message":"Retry transient errors on agents search (#243105)\n\nPartially resolves: https://github.com/elastic/kibana/issues/243098\n\nWe can sometimes get a `no_shard_available_action_exception` when\nsearching agents on `/api/fleet/agents` while awaiting the first agent\nto be enrolled in fleet, and for the `.fleet-agents` index to exist.\n\nThis PR mitigates this issue by adding retries on transient ES errors.\n\n## Release notes\n\n* Adds retry behavior for `/api/fleet/agents` endpoints when transient issues with\nES are encountered.","sha":"2d8970911411a579a2fb77b44cb6418da9cbcc64"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.2","9.1"],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/243105","number":243105,"mergeCommit":{"message":"Retry transient errors on agents search (#243105)\n\nPartially resolves: https://github.com/elastic/kibana/issues/243098\n\nWe can sometimes get a `no_shard_available_action_exception` when\nsearching agents on `/api/fleet/agents` while awaiting the first agent\nto be enrolled in fleet, and for the `.fleet-agents` index to exist.\n\nThis PR mitigates this issue by adding retries on transient ES errors.\n\n## Release notes\n\n* Adds retry behavior for `/api/fleet/agents` endpoints when transient issues with\nES are encountered.","sha":"2d8970911411a579a2fb77b44cb6418da9cbcc64"}},{"branch":"8.19","label":"v8.19.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Michel Losier <michel.losier@elastic.co>
MichelLosier
added a commit
that referenced
this pull request
Nov 18, 2025
# Backport This will backport the following commits from `main` to `8.19`: - [Retry transient errors on agents search (#243105)](#243105) <!--- Backport version: 10.1.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Michel Losier","email":"michel.losier@elastic.co"},"sourceCommit":{"committedDate":"2025-11-17T19:29:16Z","message":"Retry transient errors on agents search (#243105)\n\nPartially resolves: https://github.com/elastic/kibana/issues/243098\n\nWe can sometimes get a `no_shard_available_action_exception` when\nsearching agents on `/api/fleet/agents` while awaiting the first agent\nto be enrolled in fleet, and for the `.fleet-agents` index to exist.\n\nThis PR mitigates this issue by adding retries on transient ES errors.\n\n## Release notes\n\n* Adds retry behavior for `/api/fleet/agents` endpoints when transient issues with\nES are encountered.","sha":"2d8970911411a579a2fb77b44cb6418da9cbcc64","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:version","v9.3.0","v8.19.8","v9.2.2","v9.1.8"],"title":"Retry transient errors on agents search","number":243105,"url":"https://github.com/elastic/kibana/pull/243105","mergeCommit":{"message":"Retry transient errors on agents search (#243105)\n\nPartially resolves: https://github.com/elastic/kibana/issues/243098\n\nWe can sometimes get a `no_shard_available_action_exception` when\nsearching agents on `/api/fleet/agents` while awaiting the first agent\nto be enrolled in fleet, and for the `.fleet-agents` index to exist.\n\nThis PR mitigates this issue by adding retries on transient ES errors.\n\n## Release notes\n\n* Adds retry behavior for `/api/fleet/agents` endpoints when transient issues with\nES are encountered.","sha":"2d8970911411a579a2fb77b44cb6418da9cbcc64"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/243105","number":243105,"mergeCommit":{"message":"Retry transient errors on agents search (#243105)\n\nPartially resolves: https://github.com/elastic/kibana/issues/243098\n\nWe can sometimes get a `no_shard_available_action_exception` when\nsearching agents on `/api/fleet/agents` while awaiting the first agent\nto be enrolled in fleet, and for the `.fleet-agents` index to exist.\n\nThis PR mitigates this issue by adding retries on transient ES errors.\n\n## Release notes\n\n* Adds retry behavior for `/api/fleet/agents` endpoints when transient issues with\nES are encountered.","sha":"2d8970911411a579a2fb77b44cb6418da9cbcc64"}},{"branch":"8.19","label":"v8.19.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/243275","number":243275,"state":"OPEN"},{"branch":"9.1","label":"v9.1.8","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/243274","number":243274,"state":"OPEN"}]}] BACKPORT-->
eokoneyo
pushed a commit
to eokoneyo/kibana
that referenced
this pull request
Dec 2, 2025
Partially resolves: elastic#243098 We can sometimes get a `no_shard_available_action_exception` when searching agents on `/api/fleet/agents` while awaiting the first agent to be enrolled in fleet, and for the `.fleet-agents` index to exist. This PR mitigates this issue by adding retries on transient ES errors. ## Release notes * Adds retry behavior for `/api/fleet/agents` endpoints when transient issues with ES are encountered.
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.
Summary
Partially resolves: #243098
We can sometimes get a
no_shard_available_action_exceptionwhen searching agents on/api/fleet/agentswhile awaiting the first agent to be enrolled in fleet, and for the.fleet-agentsindex to exist.This PR mitigates this issue by adding retries on transient ES errors.
Release notes
/api/fleet/agentswhen transient issues with ES are encountered.Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.Identify risks
Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.
Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.