Fix discovery of Nomad allocations#28700
Merged
jsoriano merged 3 commits intoelastic:masterfrom Nov 22, 2021
Merged
Conversation
Contributor
|
Pinging @elastic/integrations (Team:Integrations) |
In some cases there can be multiple events during the startup of Nomad allocations. These updates were being ignored, so the allocation was not discovered, missing events.
9fa32d1 to
adae702
Compare
andrewkroh
approved these changes
Oct 28, 2021
Contributor
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
Contributor
|
This pull request is now in conflicts. Could you fix it? 🙏 |
mergify bot
pushed a commit
that referenced
this pull request
Nov 22, 2021
In some cases there can be multiple events during the startup of Nomad allocations. These updates were being ignored, so the allocation was not discovered, missing events. (cherry picked from commit 389da94)
mergify bot
pushed a commit
that referenced
this pull request
Nov 22, 2021
In some cases there can be multiple events during the startup of Nomad allocations. These updates were being ignored, so the allocation was not discovered, missing events. (cherry picked from commit 389da94)
v1v
added a commit
to v1v/beats
that referenced
this pull request
Nov 22, 2021
…ws-on-file-changes * upstream/master: Fix discovery of Nomad allocations (elastic#28700) Add null (`\u0000`) as a valid line terminator (elastic#28998) Remove `logging.files.suffix` option and always use datetime suffixes (elastic#28927) x-pack/filebeat/module: add note for default var.input (elastic#28324) Fix AccessList & AccessMask processing in security data_stream (elastic#29016) [Metricbeat] Fix wrong mapping on "info" subkey (elastic#28782) ci: daily/weekly jobs (elastic#29050) [mergify] report open backported PRs once a week (elastic#28964)
jsoriano
added a commit
that referenced
this pull request
Nov 23, 2021
In some cases there can be multiple events during the startup of Nomad allocations. These updates were being ignored, so the allocation was not discovered, missing events. (cherry picked from commit 389da94) Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
jsoriano
added a commit
that referenced
this pull request
Nov 23, 2021
In some cases there can be multiple events during the startup of Nomad allocations. These updates were being ignored, so the allocation was not discovered, missing events. (cherry picked from commit 389da94) Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
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.
What does this PR do?
Fixes issues with the discovery of Nomad allocations.
Nomad keeps track of changes in its resources using sequential "indexes", each resource has an index that indicates when it was updated.
Autodiscover watcher works by polling, on each iteration it keeps track of the last index used for all resources. On each iteration, events with older indexes are ignored.
When discovering allocations, it was using the allocation index, that doesn't seem to be updated every time the allocation is modified. Modification index is used now.
Detailed investigation of the issue can be found in #27035, thanks to @zemm.
Why is it important?
In some cases there can be multiple events during the startup of Nomad allocations. These updates were being ignored, so the allocation was not discovered, missing events.
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
Related issues