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

[Flaky Test]: TestContainerCMDWithAVeryLongStatePath - Warning: failed to walk path /usr/share/elastic-agent: lstat /usr/share/elastic-agent: no such file or directory #5328

Open
pierrehilbert opened this issue Aug 20, 2024 · 4 comments
Labels
flaky-test Unstable or unreliable test cases. Team:Elastic-Agent Label for the Agent team

Comments

@pierrehilbert
Copy link
Contributor

pierrehilbert commented Aug 20, 2024

Failing test case

TestContainerCMDWithAVeryLongStatePath

Error message

agent container initialisation - chown paths         	            	Warning: failed to walk path /usr/share/elastic-agent: lstat /usr/share/elastic-agent: no such file or directory

Build

https://buildkite.com/elastic/elastic-agent-extended-testing/builds/1992#01916a91-37a7-42e3-9153-fca5895d28b9
https://buildkite.com/elastic/elastic-agent-extended-testing/builds/2018#01916d01-c849-4dc6-a145-fe5d243f3de2

OS

Linux

Stacktrace and notes

Error Trace:	/home/ubuntu/agent/testing/integration/container_cmd_test.go:261
        	Error:      	Condition never satisfied
        	Test:       	TestContainerCMDWithAVeryLongStatePath/no_path_set
        	Messages:   	Elastic-Agent did not report healthy. Agent status error: "", Agent logs
        	            	agent container initialisation - chown paths
        	            	Warning: failed to walk path /usr/share/elastic-agent: lstat /usr/share/elastic-agent: no such file or directory
@pierrehilbert pierrehilbert added Team:Elastic-Agent Label for the Agent team flaky-test Unstable or unreliable test cases. labels Aug 20, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@ycombinator ycombinator changed the title [Flaky Test]: TestContainerCMDWithAVeryLongStatePath - Warning: failed to walk path /usr/share/elastic-agent: lstat /usr/share/elastic-agent: no such file or directory [Flaky Test]: TestContainerCMDWithAVeryLongStatePath - Warning: failed to walk path /usr/share/elastic-agent: lstat /usr/share/elastic-agent: no such file or directory Aug 21, 2024
@ycombinator
Copy link
Contributor

ycombinator commented Aug 21, 2024

Looks like this test first started failing after #5263 was merged which, of course, makes no sense since that PR didn't touch any code or tests.

[EDIT] Thanks @belimawr for pointing out that this test failure could be due to a change in Beats, given that the logs in the test failure are Beats logs. Looking through Beats commits around the same time as when the test first started failing to see if we can narrow things down...

@ycombinator
Copy link
Contributor

Nothing jumps out in the logs or the Beats commits from around the time the test started failing. The test fails because Agent doesn't report as healthy so it might be useful, as a first step, to get the test to print out the output of elastic-agent status --output full right before the failing assertion.

@ycombinator
Copy link
Contributor

The test fails because Agent doesn't report as healthy so it might be useful, as a first step, to get the test to print out the output of elastic-agent status --output full right before the failing assertion.

Debugging PR: #5340

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky-test Unstable or unreliable test cases. Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

No branches or pull requests

3 participants