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

[Agent] Make package fails when x-pack/agent is added to the BEATS' #16908

Closed
ph opened this issue Mar 9, 2020 · 4 comments · Fixed by #16927
Closed

[Agent] Make package fails when x-pack/agent is added to the BEATS' #16908

ph opened this issue Mar 9, 2020 · 4 comments · Fixed by #16927
Assignees
Labels

Comments

@ph
Copy link
Contributor

ph commented Mar 9, 2020

When the release-manager tries to run the make snapshot command and the agent is added to the list of beats in the Makefile. (BEATS?= ... x-pack/agent) The build will fail and complains that it cannot found the filebeat or metricbeat artifacts.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Project:fleet)

@ph
Copy link
Contributor Author

ph commented Mar 9, 2020

Reproducable locally.

Error: failed building agent type=tar.gz for platform=darwin/amd64: failed adding file={Source:/home/ph/go/src/github.com/elastic/beats/x-pack/filebeat/build/distributions/filebeat-8.0.0-darwin-x86_64.tar.gz Content: Template: Target:beats/filebeat-8.0.0-darwin-x86_64.tar.gz Mode:-rw-r--r-- Config:false Modules:false Dep:<nil> Owner:} to tar: lstat /home/ph/go/src/github.com/elastic/beats/x-pack/filebeat/build/distributions/filebeat-8.0.0-darwin-x86_64.tar.gz: no such file or directory
failed building agent type=docker for platform=linux/amd64: failed to copy from /home/ph/go/src/github.com/elastic/beats/x-pack/filebeat/build/distributions/filebeat-8.0.0-linux-x86_64.tar.gz to build/package/agent/agent-linux-amd64.docker/docker-build/beat/beats/filebeat-8.0.0-linux-x86_64.tar.gz: copy failed: cannot stat source file /home/ph/go/src/github.com/elastic/beats/x-pack/filebeat/build/distributions/filebeat-8.0.0-linux-x86_64.tar.gz: stat /home/ph/go/src/github.com/elastic/beats/x-pack/filebeat/build/distributions/filebeat-8.0.0-linux-x86_64.tar.gz: no such file or directory
failed building agent type=rpm for platform=linux/386: failed adding file={Source:/home/ph/go/src/github.com/elastic/beats/x-pack/filebeat/build/distributions/filebeat-8.0.0-linux-x86.tar.gz Content: Template: Target:/etc/agent/beats/filebeat-8.0.0-linux-x86.tar.gz Mode:-rw-r--r-- Config:false Modules:false Dep:<nil> Owner:} to tar: lstat /home/ph/go/src/github.com/elastic/beats/x-pack/filebeat/build/distributions/filebeat-8.0.0-linux-x86.tar.gz: no such file or directory
failed building agent type=tar.gz for platform=linux/amd64: failed adding file={Source:/home/ph/go/src/github.com/elastic/beats/x-pack/filebeat/build/distributions/filebeat-8.0.0-linux-x86_64.tar.gz Content: Template: Target:beats/filebeat-8.0.0-linux-x86_64.tar.gz Mode:-rw-r--r-- Config:false Modules:false Dep:<nil> Owner:} to tar: lstat /home/ph/go/src/github.com/elastic/beats/x-pack/filebeat/build/distributions/filebeat-8.0.0-linux-x86_64.tar.gz: no such file or directory
failed building agent type=rpm for platform=linux/amd64: failed adding file={Source:/home/ph/go/src/github.com/elastic/beats/x-pack/metricbeat/build/distributions/metricbeat-8.0.0-linux-x86_64.tar.gz Content: Template: Target:/etc/agent/beats/metricbeat-8.0.0-linux-x86_64.tar.gz Mode:-rw-r--r-- Config:false Modules:false Dep:<nil> Owner:} to tar: lstat /home/ph/go/src/github.com/elastic/beats/x-pack/metricbeat/build/distributions/metricbeat-8.0.0-linux-x86_64.tar.gz: no such file or directory
failed building agent type=tar.gz for platform=linux/386: failed adding file={Source:/home/ph/go/src/github.com/elastic/beats/x-pack/filebeat/build/distributions/filebeat-8.0.0-linux-x86.tar.gz Content: Template: Target:beats/filebeat-8.0.0-linux-x86.tar.gz Mode:-rw-r--r-- Config:false Modules:false Dep:<nil> Owner:} to tar: lstat /home/ph/go/src/github.com/elastic/beats/x-pack/filebeat/build/distributions/filebeat-8.0.0-linux-x86.tar.gz: no such file or directory
failed building agent type=deb for platform=linux/386: failed adding file={Source:/home/ph/go/src/github.com/elastic/beats/x-pack/metricbeat/build/distributions/metricbeat-8.0.0-linux-x86.tar.gz Content: Template: Target:/etc/agent/beats/metricbeat-8.0.0-linux-x86.tar.gz Mode:-rw-r--r-- Config:false Modules:false Dep:<nil> Owner:} to tar: lstat /home/ph/go/src/github.com/elastic/beats/x-pack/metricbeat/build/distributions/metricbeat-8.0.0-linux-x86.tar.gz: no such file or directory
failed building agent type=zip for platform=windows/386: failed adding file=/home/ph/go/src/github.com/elastic/beats/x-pack/metricbeat/build/distributions/metricbeat-8.0.0-windows-x86.zip to zip: lstat /home/ph/go/src/github.com/elastic/beats/x-pack/metricbeat/build/distributions/metricbeat-8.0.0-windows-x86.zip: no such file or directory
failed building agent type=deb for platform=linux/amd64: failed adding file={Source:/home/ph/go/src/github.com/elastic/beats/x-pack/metricbeat/build/distributions/metricbeat-8.0.0-linux-x86_64.tar.gz Content: Template: Target:/etc/agent/beats/metricbeat-8.0.0-linux-x86_64.tar.gz Mode:-rw-r--r-- Config:false Modules:false Dep:<nil> Owner:} to tar: lstat /home/ph/go/src/github.com/elastic/beats/x-pack/metricbeat/build/distributions/metricbeat-8.0.0-linux-x86_64.tar.gz: no such file or directory
failed building agent type=zip for platform=windows/amd64: failed adding file=/home/ph/go/src/github.com/elastic/beats/x-pack/metricbeat/build/distributions/metricbeat-8.0.0-windows-x86_64.zip to zip: lstat /home/ph/go/src/github.com/elastic/beats/x-pack/metricbeat/build/distributions/metricbeat-8.0.0-windows-x86_64.zip: no such file or directory
make[2]: *** [../../dev-tools/make/xpack.mk:41: release] Error 1
make[2]: Leaving directory '/home/ph/go/src/github.com/elastic/beats/x-pack/agent'
make[1]: *** [Makefile:161: release] Error 1

@ph
Copy link
Contributor Author

ph commented Mar 10, 2020

To make sure no one run into the same issues, it's because the path of the binary should also contains a "snapshot" like metricbeat-8.0.0-SNAPSHOT-darwin-x86_64.tar.gz

@ph
Copy link
Contributor Author

ph commented Mar 10, 2020

As a note here, if you ever want to test again you may have to disable "mage packageBeatDashboard" this task doesn't use the BEATS? variable defined in the Makefile to limit what need to be build. This will save you a lot of time if you want to understand why a part of the build doesn't work.

ph added a commit to ph/beats that referenced this issue Mar 10, 2020
An extension in the generated files ("SNAPSHOT") was preventing us to
correctly generate the agent artifact with the packaged
metricbeat/filebeat.

Fixes: elastic#16908
@ph ph closed this as completed in #16927 Mar 11, 2020
ph added a commit that referenced this issue Mar 11, 2020
…#16927)

An extension in the generated files ("SNAPSHOT") was preventing us to
correctly generate the agent artifact with the packaged
metricbeat/filebeat.

Fixes: #16908
ph added a commit to ph/beats that referenced this issue Apr 7, 2020
…elastic#16927)

An extension in the generated files ("SNAPSHOT") was preventing us to
correctly generate the agent artifact with the packaged
metricbeat/filebeat.

Fixes: elastic#16908
(cherry picked from commit 62d3683)
ph added a commit that referenced this issue Apr 7, 2020
… enable building the agent. (#17574)

* Fix issue when building Agent snapshot and enable building the agent. (#16927)

An extension in the generated files ("SNAPSHOT") was preventing us to
correctly generate the agent artifact with the packaged
metricbeat/filebeat.

Fixes: #16908
(cherry picked from commit 62d3683)

* [Agent] Fix installers (#17077)

[Agent] Fix installers for snapshots (#17077)

* [Agent] fixed mage package for agent (#17368)

[Agent] fixed mage package for agent (#17368)

* [Agent] Make default config OS agnostic (#17016)

[Agent] Make default config OS agnostic (#17016)

* [Agent] Docker image for integration tests (#16898)

[Agent] Docker image for integration tests (#16898)

Co-authored-by: Michal Pristas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants