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

[Elastic Agent] Partial extracted beat result in failure to spawn beat #21718

Closed
blakerouse opened this issue Oct 12, 2020 · 3 comments · Fixed by #21745
Closed

[Elastic Agent] Partial extracted beat result in failure to spawn beat #21718

blakerouse opened this issue Oct 12, 2020 · 3 comments · Fixed by #21745
Assignees
Labels

Comments

@blakerouse
Copy link
Contributor

If Elastic Agent is stopped during a extraction of a beat or any application the resulting extraction can become incomplete if Elastic Agent is stopped while the extraction is occurring. The partial extracted folder is not removed during stop and on the next start the newly running Elastic Agent process will think the extraction was successful and run that binary. The starting of the binary can result in failure:

Application: metricbeat--7.10.0[6a52a569-7a63-447a-82db-5102d3fb26b9]: State changed to FAILED: failed to start 'C:\Program Files\Elastic\Agent\data\elastic-agent-47b32e\install\metricbeat-7.10.0-windows-x86_64\metricbeat': fork/exec C:\Program Files\Elastic\Agent\data\elastic-agent-47b32e\install\metricbeat-7.10.0-windows-x86_64\metricbeat.exe: %! (MISSING)is not a valid Win32 application.

For confirmed bugs, please report:

  • Version: 7.10.0 BC1
  • Operating System: Windows (expect same result on others)
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Team:Ingest Management)

@blakerouse
Copy link
Contributor Author

Best solution is probably to perform extraction into a temporary folder then only move to the correct directory name, once extraction is successful. That would ensure that even if the program crashed or was hard killed would not result in a bad extraction.

@michalpristas
Copy link
Contributor

I had the very same strategy in mind for this ;-)

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.

3 participants