elastic / elastic/elastic-agent

Elastic agent gets stuck trying to install application

Open
#191 11 comments 0 reactions 1 assignee Claimed by @AndersonQ View on GitHub
estimation:Day Team:Elastic-Agent-Control-Plane v8.4.0
Dominant language
Go
Stars
275
Forks
264
Avg merge
1d 20h
Merged PRs (30d)
298

Description

If the elastic agent, managed by fleet, finds the application to be installed on its `download` folder, it'll unpack and install. However if the install operation fails, it'll retry it indefinitely, preventing any other application to be installed. Others could succeed.

What I did:
- create a tar ball adding the `endpoint-security to data/elastic-agent-*/download/`
- the endpoint-security was "broken", the uncompressed folder was different from the .tar.gz file. The uncompressed folder would have the `-SNAPSHOT` on the name, while the tar.gz file did not.
- had a policy including the endpoint-security, system integration and monitoring

For the time I observed, the elastic-agent was stuck in the following loop:
- start the install procedure
- unpack the endpoint-security
- not find the unpacked folder (as the name was different from what the elastic-agent was looking for)
- remove the tmp folder and its contents
- start the install procedure again

Here are some debug logs showing it stuck on the retry while trying to install the elastic-endpoint:
- [gist](https://gist.github.com/AndersonQ/47c2c0e2893e154ef98ebcfe88fe3df6)
- image:
![agent](https://user-images.githubusercontent.com/203669/157695467-042bd238-a8e6-40f1-a68c-e68ad04fbaef.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.