[8.17](backport #44697) Remove ID from list when Filestream inputs fail to be created #44739
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
Filestream was not removing the ID from inputs that failed to start, that made re-starting the same input with a valid configuration to fail with a duplicated ID error. This affects any configuration mode that can be reloaded, Elastic-Agent being the main use case.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
## Author's ChecklistHow to test this PR locally
1. Create the following files
filebeat.yml
inputs.d/filestream.yml
/tmp/flog.log
2. Build and Start Filebeat
go build . ./filebeat
Wait for the log error:
3. Edit
inputs.d/filestream.yml
so it is validRemove the first, invalid, path and uncomment the second one.
paths
section so it looks like this:Save the file and wait to see the ingested events in the console.
## Use cases## Screenshots## LogsThis is an automatic backport of pull request #44697 done by Mergify.