Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #19633 to 7.x: Update filebeat registrar to use statestore #19743

Merged
merged 2 commits into from
Jul 8, 2020

Conversation

urso
Copy link

@urso urso commented Jul 8, 2020

Cherry-pick of PR #19633 to 7.x branch. Original message:

  • Refactoring

What does this PR do?

Update filebeat registrar, initialization and testing to use the
statestore as new persistent storage backend between restarts.

This PR swaps out the storage backend, adds support for migrating old registry files to the statestore, and updates existing tests in filebeat. The migration support extends the already existing migration support, supporting old registry files from the 6.x release as well (system tests start at 6.3).

Why is it important?

  • Provide support for seamless migration to new storage format
  • By using the same store old and new style inputs can coexist more easily.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
    - [ ] I have made corresponding changes to the documentation
    - [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
    - [ ] I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

Run filebeat tests/system

Related issues

@urso urso added [zube]: In Review backport Team:Services (Deprecated) Label for the former Integrations-Services team labels Jul 8, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 8, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-services (Team:Services)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 8, 2020
@botelastic
Copy link

botelastic bot commented Jul 8, 2020

This pull request doesn't have a Team:<team> label.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 8, 2020

❕ Build Aborted

Either there was a build timeout or someone aborted the build.'}

Pipeline View Test View Changes Artifacts

Expand to view the summary

Build stats

  • Build Cause: [Pull request #19743 updated]

  • Start Time: 2020-07-08T21:22:39.719+0000

  • Duration: 122 min 14 sec

Test stats 🧪

Test Results
Failed 0
Passed 9232
Skipped 1580
Total 10812

Log output

Expand to view the last 100 lines of log output

[2020-07-08T23:24:24.563Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-07-08T23:24:24.563Z] + FILE=journalbeat/build/coverage/full.cov
[2020-07-08T23:24:24.563Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-07-08T23:24:25.743Z] Failed in branch Filebeat oss
[2020-07-08T23:24:25.820Z] Failed in branch Filebeat x-pack
[2020-07-08T23:24:25.946Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats
[2020-07-08T23:24:26.368Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-07-08T23:24:26.382Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Lint
[2020-07-08T23:24:26.480Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-07-08T23:24:26.561Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Winlogbeat-oss
[2020-07-08T23:24:26.642Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-07-08T23:24:26.722Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Auditbeat-oss-Mac-OS-X
[2020-07-08T23:24:26.806Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Auditbeat-x-pack-Mac-OS-X
[2020-07-08T23:24:26.892Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-07-08T23:24:26.970Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Dockerlogbeat
[2020-07-08T23:24:27.046Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-07-08T23:24:27.131Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Journalbeat-oss
[2020-07-08T23:24:27.210Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-07-08T23:24:27.290Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-07-08T23:24:27.372Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-07-08T23:24:27.448Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-07-08T23:24:27.532Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-07-08T23:24:27.609Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Heartbeat-oss
[2020-07-08T23:24:27.682Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-07-08T23:24:27.757Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-07-08T23:24:27.835Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-07-08T23:24:27.915Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Auditbeat-oss-Windows
[2020-07-08T23:24:27.990Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Libbeat-x-pack
[2020-07-08T23:24:28.069Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-07-08T23:24:28.143Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Metricbeat-x-pack-Mac-OS-X
[2020-07-08T23:24:28.217Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Auditbeat-x-pack-Windows
[2020-07-08T23:24:28.297Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-07-08T23:24:28.370Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-07-08T23:24:28.446Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Filebeat-Windows
[2020-07-08T23:24:28.519Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Auditbeat-oss-Linux
[2020-07-08T23:24:28.593Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Packetbeat-oss
[2020-07-08T23:24:28.665Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-07-08T23:24:28.739Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Metricbeat-Windows
[2020-07-08T23:24:28.817Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-07-08T23:24:28.890Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-07-08T23:24:28.963Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-07-08T23:24:29.037Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Functionbeat-Windows
[2020-07-08T23:24:29.110Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Heartbeat-Windows
[2020-07-08T23:24:29.182Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-07-08T23:24:29.255Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-07-08T23:24:29.330Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-07-08T23:24:29.403Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-07-08T23:24:29.475Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Libbeat-oss
[2020-07-08T23:24:29.547Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-07-08T23:24:29.622Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-07-08T23:24:29.695Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Libbeat-stress-tests
[2020-07-08T23:24:29.767Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Filebeat-x-pack
[2020-07-08T23:24:29.837Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Filebeat-oss
[2020-07-08T23:24:30.203Z] + cat
[2020-07-08T23:24:30.203Z] + /usr/local/bin/runbld ./runbld-script
[2020-07-08T23:24:30.203Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-07-08T23:24:38.371Z] runbld>>> runbld started
[2020-07-08T23:24:38.371Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-07-08T23:24:39.319Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-19743' in order of occurrence in the config (last value wins).
[2020-07-08T23:24:40.710Z] runbld>>> Debug logging enabled.
[2020-07-08T23:24:40.710Z] runbld>>> Storing result
[2020-07-08T23:24:40.974Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-07-08T23:24:40.974Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200708232440-DF0137DA
[2020-07-08T23:24:40.974Z] runbld>>> Adding system facts.
[2020-07-08T23:24:41.932Z] runbld>>> Adding vcs info for the latest commit:  cb0e304b892f6b84905fa59336afc269374a3103
[2020-07-08T23:24:41.932Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-07-08T23:24:41.932Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-07-08T23:24:41.932Z] Processing JUnit reports with runbld...
[2020-07-08T23:24:41.932Z] + echo 'Processing JUnit reports with runbld...'
[2020-07-08T23:24:42.507Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-07-08T23:24:42.507Z] runbld>>> DURATION: 32ms
[2020-07-08T23:24:42.508Z] runbld>>> STDOUT: 40 bytes
[2020-07-08T23:24:42.508Z] runbld>>> STDERR: 49 bytes
[2020-07-08T23:24:42.508Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-07-08T23:24:42.508Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats
[2020-07-08T23:24:43.455Z] runbld>>> Storing build metadata: 
[2020-07-08T23:24:43.455Z] runbld>>> Adding test report.
[2020-07-08T23:24:43.455Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats
[2020-07-08T23:24:44.401Z] runbld>>> Found 113 test output files
[2020-07-08T23:24:44.978Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-07-08T23:24:44.978Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-07-08T23:24:45.241Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-07-08T23:24:45.241Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-07-08T23:24:45.241Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-07-08T23:24:46.632Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-07-08T23:24:46.632Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-07-08T23:24:47.205Z] runbld>>> Test output logs contained: Errors: 0 Failures: 0 Tests: 10666 Skipped: 1343
[2020-07-08T23:24:47.205Z] runbld>>> Storing result
[2020-07-08T23:24:47.205Z] runbld>>> FAILURES: 0
[2020-07-08T23:24:47.467Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-07-08T23:24:47.467Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200708232440-DF0137DA
[2020-07-08T23:24:47.467Z] runbld>>> Email notification disabled by environment variable.
[2020-07-08T23:24:47.467Z] runbld>>> Slack notification disabled by environment variable.
[2020-07-08T23:24:52.995Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19743
[2020-07-08T23:24:53.097Z] [INFO] getVaultSecret: Getting secrets
[2020-07-08T23:24:53.164Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-07-08T23:24:53.938Z] + chmod 755 generate-build-data.sh
[2020-07-08T23:24:53.938Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19743/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19743/runs/3 ABORTED 7333958
[2020-07-08T23:24:53.938Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19743/runs/3/steps/?limit=10000 -o steps-info.json
[2020-07-08T23:24:55.800Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19743/runs/3/tests/?status=FAILED -o tests-errors.json

Update filebeat registrar, initialization and testing to use the
statestore as new persistent storage backend between restarts.

This PR swaps out the storage backend, adds support for migrating old registry files to the statestore, and updates existing tests in filebeat. The migration support extends the already existing migration support, supporting old registry files from the 6.x release as well (system tests start at 6.3).

(cherry picked from commit 5c719cf)
@urso urso force-pushed the backport_19633_7.x branch from 55d590d to b4bf13b Compare July 8, 2020 20:37
@urso urso merged commit 399c026 into elastic:7.x Jul 8, 2020
@urso urso deleted the backport_19633_7.x branch July 8, 2020 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Services (Deprecated) Label for the former Integrations-Services team [zube]: Done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants