Closed rdner closed 1 month ago
Pinging @elastic/elastic-agent (Team:Elastic-Agent)
This has been introduced by https://github.com/elastic/elastic-agent/pull/4932 @belimawr mentioned before going into PTO that it seems to be working when run alone but to be flaky when run with all the other tests so we probably have some conflicts between tests somewhere
The error reported here is different from the one fixed by https://github.com/elastic/elastic-agent/pull/5341
More recent builds failing on this test + assertion:
Added to list in issue description.
~This test is failing quite regularly on PRs so I'm going to disable it now to unblock PRs that have been blocked for a while, e.g. https://github.com/elastic/elastic-agent/pull/5267.~. Never mind, it's skipped already (since yesterday). Some older PRs just need to be rebased on main
.
(Spoiler alert: the test itself is not flaky, it's just reading the "wrong configuration" :exploding_head:)
/usr/share/elastic-agent/state/container-paths.yml
containing:
state_path: /usr/share/elastic-agent/state
config_path: /usr/share/elastic-agent/state
socket_path: unix:///usr/share/elastic-agent/state/data/Td8I7R-Zby36_zF_IOd9QVNlFblNEro3.sock
./elastic-agent
/usr/share/elastic-agent/state/data/logs
fleet.enc
from /usr/share/elastic-agent/state/
instead of starting with an empty configuration as expected.Another way to reproduce the issue is to create /usr/share/elastic-agent/state/container-paths.yml
as shown in my last post, then:
path
map in computed-config.yaml
will look like this:
path:
config: /usr/share/elastic-agent/state
data: /usr/share/elastic-agent/state/data
home: /usr/share/elastic-agent/state/data
logs: /home/ubuntu/elastic-agent-8.16.0-SNAPSHOT-linux-x86_64
Even though it shows path.logs: /home/ubuntu/elastic-agent-8.16.0-SNAPSHOT-linux-x86_64
the logs are actually stored at /usr/share/elastic-agent/state/data/logs/
.
The same happens if the Elastic-Agent is installed directly the paths
is:
path:
config: /usr/share/elastic-agent/state
data: /usr/share/elastic-agent/state/data
home: /usr/share/elastic-agent/state/data
logs: /opt/Elastic/Agent
But the logs are at /usr/share/elastic-agent/state/data/logs/
@belimawr I think we should backport this fix as well. I faced the failure in my backport PR
You've already done that. Thanks!
Failing test case
TestEventLogOutputConfiguredViaFleet
Error message
could not find event log file
Build
OS
Linux
Stacktrace and notes