[8.17](backport #42435) Remove erroneous status reporting #42540
+4
−6
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.
Proposed commit message
This commit removes a erroneous status reporting from the Filestream input.
inp.readFromSource
can only return the error from the canceler, this error should not be reported to the manager/Elastic-Agent.inp.readFromSource
is called byfilestream.Run
, which is called by thestartHarvester
function. This function already reports the error returned byfilestream.Run
and correctly filters out 'context cancelled' errors.Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.## Disruptive User Impact## Author's ChecklistHow to test this PR locally
That's a tricky PR to test because there is a timing issue involved, essentially using a local Kubernets cluster, deploy Elastic-Agent
v8.17.1
collecting logs, make containers generate so many logs the host machine is going to have it's CPU at 100%, the Filestream input will start reporting unhealthy without the changes of this PR.There are some more details of how I reproduced/tested it here: elastic/elastic-agent#6596 (comment)
Related issues
8.17.1
elastic-agent#6596## Use cases## Screenshots## LogsThis is an automatic backport of pull request #42435 done by Mergify.