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 #24559 to 7.12: Fix default scope in add_nomad_metadata #24566

Merged
merged 2 commits into from
Mar 16, 2021

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Mar 16, 2021

Cherry-pick of PR #24559 to 7.12 branch. Original message:

What does this PR do?

Fix default scope in add_nomad_metadata. It is set to local, but it should be node. Error message also shows that local is a valid value.

With default configuration this is logged:

2021-03-16T12:37:36.611+0100	ERROR	instance/beat.go:953	Exiting: error initializing processors: fail to unpack the nomad configuration: invalid value for `scope`, select `local` or `global` accessing 'processors.0.add_nomad_metadata'

Why is it important?

Current default is invalid and error message is misleading.

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.

Related issues

Fix default scope in add_nomad_metadata. It is set to local, but
it should be node. Fix also error message that showed that local
is a valid value.

(cherry picked from commit ab2b478)
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Mar 16, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Mar 16, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Mar 16, 2021

💔 Build Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: jsoriano commented: /test

  • Start Time: 2021-03-16T18:07:28.291+0000

  • Duration: 54 min 58 sec

  • Commit: 17a275b

Test stats 🧪

Test Results
Failed 0
Passed 18190
Skipped 1532
Total 19722

Trends 🧪

Image of Build Times

Image of Tests

Steps errors 6

Expand to view the steps failures

Prepare test output
  • Took 0 min 4 sec . View more details on here
  • Description: python .ci/scripts/pre_archive_test.py
Prepare test output
  • Took 0 min 5 sec . View more details on here
  • Description: python .ci/scripts/pre_archive_test.py
Prepare test output
  • Took 0 min 2 sec . View more details on here
  • Description: python .ci/scripts/pre_archive_test.py
Prepare test output
  • Took 0 min 6 sec . View more details on here
  • Description: python .ci/scripts/pre_archive_test.py
x-pack/metricbeat-windows-2016-windows-2016 - mage build unitTest
  • Took 7 min 8 sec . View more details on here
  • Description: mage build unitTest
Error signal
  • Took 0 min 0 sec . View more details on here
  • Description: Error 'hudson.AbortException: script returned exit code 2'

Log output

Expand to view the last 100 lines of log output

[2021-03-16T18:59:44.946Z]  Version:           20.10.3
[2021-03-16T18:59:44.946Z]  API version:       1.41
[2021-03-16T18:59:44.946Z]  Go version:        go1.13.15
[2021-03-16T18:59:44.946Z]  Git commit:        48d30b5
[2021-03-16T18:59:44.946Z]  Built:             Fri Jan 29 14:33:13 2021
[2021-03-16T18:59:44.946Z]  OS/Arch:           linux/amd64
[2021-03-16T18:59:44.946Z]  Context:           default
[2021-03-16T18:59:44.946Z]  Experimental:      true
[2021-03-16T18:59:44.946Z] 
[2021-03-16T18:59:44.946Z] Server: Docker Engine - Community
[2021-03-16T18:59:44.946Z]  Engine:
[2021-03-16T18:59:44.946Z]   Version:          20.10.3
[2021-03-16T18:59:44.946Z]   API version:      1.41 (minimum version 1.12)
[2021-03-16T18:59:44.946Z]   Go version:       go1.13.15
[2021-03-16T18:59:44.946Z]   Git commit:       46229ca
[2021-03-16T18:59:44.946Z]   Built:            Fri Jan 29 14:31:25 2021
[2021-03-16T18:59:44.946Z]   OS/Arch:          linux/amd64
[2021-03-16T18:59:44.946Z]   Experimental:     false
[2021-03-16T18:59:44.946Z]  containerd:
[2021-03-16T18:59:44.946Z]   Version:          1.4.4
[2021-03-16T18:59:44.946Z]   GitCommit:        05f951a3781f4f2c1911b05e61c160e9c30eaa8e
[2021-03-16T18:59:44.946Z]  runc:
[2021-03-16T18:59:44.946Z]   Version:          1.0.0-rc93
[2021-03-16T18:59:44.946Z]   GitCommit:        12644e614e25b05da6fd08a38ffa0cfe1903fdec
[2021-03-16T18:59:44.946Z]  docker-init:
[2021-03-16T18:59:44.946Z]   Version:          0.19.0
[2021-03-16T18:59:44.946Z]   GitCommit:        de40ad0
[2021-03-16T18:59:44.946Z] Change ownership of all files inside the specific folder from root/root to current user/group
[2021-03-16T18:59:44.946Z] Unable to find image 'alpine:3.4' locally
[2021-03-16T18:59:45.518Z] 3.4: Pulling from library/alpine
[2021-03-16T18:59:45.779Z] c1e54eec4b57: Pulling fs layer
[2021-03-16T18:59:46.040Z] c1e54eec4b57: Verifying Checksum
[2021-03-16T18:59:46.040Z] c1e54eec4b57: Download complete
[2021-03-16T18:59:46.300Z] c1e54eec4b57: Pull complete
[2021-03-16T18:59:46.300Z] Digest: sha256:b733d4a32c4da6a00a84df2ca32791bb03df95400243648d8c539e7b4cce329c
[2021-03-16T18:59:46.300Z] Status: Downloaded newer image for alpine:3.4
[2021-03-16T18:59:48.213Z] Change permissions with write access of all files inside the specific folder
[2021-03-16T18:59:49.898Z] + python .ci/scripts/pre_archive_test.py
[2021-03-16T19:00:04.808Z] Copy ./x-pack/filebeat/build into build/x-pack/filebeat/build
[2021-03-16T19:00:04.808Z] Copy ./x-pack/filebeat/build/golang-crossbuild into build/x-pack/filebeat/build/golang-crossbuild
[2021-03-16T19:00:04.808Z] Copy ./x-pack/filebeat/build/package/filebeat/filebeat-linux-amd64.docker/docker-build into build/x-pack/filebeat/build/package/filebeat/filebeat-linux-amd64.docker/docker-build
[2021-03-16T19:00:04.808Z] Copy ./x-pack/filebeat/build/package/filebeat-ubi8/filebeat-linux-amd64.docker/docker-build into build/x-pack/filebeat/build/package/filebeat-ubi8/filebeat-linux-amd64.docker/docker-build
[2021-03-16T19:00:04.808Z] Copy ./x-pack/elastic-agent/build into build/x-pack/elastic-agent/build
[2021-03-16T19:00:04.808Z] Copy ./x-pack/elastic-agent/build/golang-crossbuild into build/x-pack/elastic-agent/build/golang-crossbuild
[2021-03-16T19:00:04.808Z] Copy ./x-pack/elastic-agent/build/package/elastic-agent/elastic-agent-linux-amd64.docker/docker-build into build/x-pack/elastic-agent/build/package/elastic-agent/elastic-agent-linux-amd64.docker/docker-build
[2021-03-16T19:00:04.808Z] Copy ./x-pack/elastic-agent/build/package/elastic-agent-ubi8/elastic-agent-linux-amd64.docker/docker-build into build/x-pack/elastic-agent/build/package/elastic-agent-ubi8/elastic-agent-linux-amd64.docker/docker-build
[2021-03-16T19:00:04.808Z] Copy ./x-pack/heartbeat/build into build/x-pack/heartbeat/build
[2021-03-16T19:00:04.808Z] Copy ./x-pack/heartbeat/build/golang-crossbuild into build/x-pack/heartbeat/build/golang-crossbuild
[2021-03-16T19:00:04.808Z] Copy ./x-pack/metricbeat/build into build/x-pack/metricbeat/build
[2021-03-16T19:00:04.808Z] Copy ./x-pack/metricbeat/build/golang-crossbuild into build/x-pack/metricbeat/build/golang-crossbuild
[2021-03-16T19:00:04.808Z] Copy ./x-pack/metricbeat/build/package/metricbeat-ubi8/metricbeat-linux-amd64.docker/docker-build into build/x-pack/metricbeat/build/package/metricbeat-ubi8/metricbeat-linux-amd64.docker/docker-build
[2021-03-16T19:00:04.808Z] Copy ./x-pack/metricbeat/build/package/metricbeat/metricbeat-linux-amd64.docker/docker-build into build/x-pack/metricbeat/build/package/metricbeat/metricbeat-linux-amd64.docker/docker-build
[2021-03-16T19:00:04.826Z] Running in /var/lib/jenkins/workspace/PR-24566-2-3943aa26-e1b4-4949-8c25-1d7dd97f42d8/src/github.com/elastic/beats/build
[2021-03-16T19:00:05.140Z] + rm -rf ve
[2021-03-16T19:00:05.140Z] + find . -type d -name vendor -exec rm -r {} ;
[2021-03-16T19:00:05.157Z] Recording test results
[2021-03-16T19:00:06.504Z] None of the test reports contained any result
[2021-03-16T19:00:06.512Z] [Checks API] No suitable checks publisher found.
[2021-03-16T19:00:06.860Z] + go clean -modcache
[2021-03-16T19:00:11.394Z] Cleaning up /var/lib/jenkins/workspace/PR-24566-2-3943aa26-e1b4-4949-8c25-1d7dd97f42d8
[2021-03-16T19:00:11.394Z] Client: Docker Engine - Community
[2021-03-16T19:00:11.394Z]  Version:           20.10.3
[2021-03-16T19:00:11.394Z]  API version:       1.41
[2021-03-16T19:00:11.394Z]  Go version:        go1.13.15
[2021-03-16T19:00:11.394Z]  Git commit:        48d30b5
[2021-03-16T19:00:11.394Z]  Built:             Fri Jan 29 14:33:13 2021
[2021-03-16T19:00:11.394Z]  OS/Arch:           linux/amd64
[2021-03-16T19:00:11.394Z]  Context:           default
[2021-03-16T19:00:11.394Z]  Experimental:      true
[2021-03-16T19:00:11.394Z] 
[2021-03-16T19:00:11.394Z] Server: Docker Engine - Community
[2021-03-16T19:00:11.394Z]  Engine:
[2021-03-16T19:00:11.394Z]   Version:          20.10.3
[2021-03-16T19:00:11.394Z]   API version:      1.41 (minimum version 1.12)
[2021-03-16T19:00:11.394Z]   Go version:       go1.13.15
[2021-03-16T19:00:11.394Z]   Git commit:       46229ca
[2021-03-16T19:00:11.394Z]   Built:            Fri Jan 29 14:31:25 2021
[2021-03-16T19:00:11.394Z]   OS/Arch:          linux/amd64
[2021-03-16T19:00:11.394Z]   Experimental:     false
[2021-03-16T19:00:11.394Z]  containerd:
[2021-03-16T19:00:11.394Z]   Version:          1.4.4
[2021-03-16T19:00:11.394Z]   GitCommit:        05f951a3781f4f2c1911b05e61c160e9c30eaa8e
[2021-03-16T19:00:11.394Z]  runc:
[2021-03-16T19:00:11.394Z]   Version:          1.0.0-rc93
[2021-03-16T19:00:11.395Z]   GitCommit:        12644e614e25b05da6fd08a38ffa0cfe1903fdec
[2021-03-16T19:00:11.395Z]  docker-init:
[2021-03-16T19:00:11.395Z]   Version:          0.19.0
[2021-03-16T19:00:11.395Z]   GitCommit:        de40ad0
[2021-03-16T19:00:11.395Z] Change ownership of all files inside the specific folder from root/root to current user/group
[2021-03-16T19:01:19.141Z] Change permissions with write access of all files inside the specific folder
[2021-03-16T19:01:19.171Z] Running in /var/lib/jenkins/workspace/PR-24566-2-3943aa26-e1b4-4949-8c25-1d7dd97f42d8
[2021-03-16T19:01:25.602Z] Stage "Packaging" skipped due to earlier failure(s)
[2021-03-16T19:01:25.669Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-24566/src/github.com/elastic/beats
[2021-03-16T19:01:25.963Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-24566
[2021-03-16T19:01:26.025Z] [INFO] getVaultSecret: Getting secrets
[2021-03-16T19:01:26.132Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2021-03-16T19:01:26.819Z] + chmod 755 generate-build-data.sh
[2021-03-16T19:01:26.819Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-24566/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-24566/runs/2 FAILURE 3238265
[2021-03-16T19:01:27.069Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-24566/runs/2/steps/?limit=10000 -o steps-info.json
[2021-03-16T19:01:30.297Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-24566/runs/2/tests/?status=FAILED -o tests-errors.json

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 18190
Skipped 1532
Total 19722

@jsoriano
Copy link
Member Author

/test

@jsoriano jsoriano merged commit 308f88a into elastic:7.12 Mar 16, 2021
@jsoriano jsoriano deleted the backport_24559_7.12 branch March 16, 2021 19:10
@zube zube bot removed the [zube]: Done label Jun 15, 2021
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…adata (elastic#24566)

Fix default scope in add_nomad_metadata. It is set to local, but
it should be node. Fix also error message that showed that local
is a valid value.

(cherry picked from commit 947e172)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants