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

TestLogIngestionFleetManaged #4092

Closed
rdner opened this issue Jan 17, 2024 · 8 comments
Closed

TestLogIngestionFleetManaged #4092

rdner opened this issue Jan 17, 2024 · 8 comments
Assignees
Labels
backport-skip flaky-test Unstable or unreliable test cases. Team:Elastic-Agent Label for the Agent team

Comments

@rdner
Copy link
Member

rdner commented Jan 17, 2024

Flaky Test

Stack Trace

 fixture_install.go:137: [test TestLogIngestionFleetManaged] Inside fixture cleanup function
    fixture.go:615: >> running binary with: [C:\Program Files\Elastic\Agent\elastic-agent.exe uninstall --force]
    fixture_install.go:187: 
        	Error Trace:	C:/Users/windows/agent/pkg/testing/fixture_install.go:187
        	            				C:/Program Files/Go/src/testing/testing.go:1169
        	            				C:/Program Files/Go/src/testing/testing.go:1347
        	            				C:/Program Files/Go/src/testing/testing.go:1589
        	Error:      	Received unexpected error:
        	            	error running uninstall command: exit status 1
        	Test:       	TestLogIngestionFleetManaged
        	Messages:   	uninstalling agent failed. Output: "
\r[    ] Stopping service  [0s] \r                              
\r\r[  ==] Successfully stopped service  [0s] \r                                          
\r\r[ ===] Stopping upgrade watcher; none found  [0s] \r                                                  
\r\r[=   ] Removing service  [0s] \r                                                  
\r\r[=   ] Successfully uninstalled service  [0s] \r                                                  
\r\r[=   ] Removing install directory  [0s] \r                                                  
\r\r[    ] Failed to remove install directory  [8s] \r                                                  
\r\r[    ] Failed to uninstall agent  [8s] Error: error uninstalling agent: failed to remove installation directory (C:\\Program Files\\Elastic\\Agent): timed out while removing \"C:\\\\Program Files\\\\Elastic\\\\Agent\". Last error: remove C:\\Program Files\\Elastic\\Agent\\data\\elastic-agent-602f70\\elastic-agent.exe: Access is denied.\nFor help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.13/fleet-troubleshooting.html\n"
--- FAIL: TestLogIngestionFleetManaged (195.95s)
@rdner rdner added Team:Elastic-Agent Label for the Agent team backport-skip labels Jan 17, 2024
@elasticmachine
Copy link
Contributor

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

@rdner
Copy link
Member Author

rdner commented Jan 17, 2024

The error was also reported in #3342

@cmacknz
Copy link
Member

cmacknz commented Jan 17, 2024

Closing as a duplicate of #3342, the problem is not specific to this test but rather is a problem in how uninstalling the agent works on Windows in general.

@cmacknz cmacknz closed this as completed Jan 17, 2024
@rdner rdner reopened this Jan 18, 2024
@rdner
Copy link
Member Author

rdner commented Jan 18, 2024

Although it is a duplicate, I'd like to keep this issue open to track the CI failure not just the bug.

@rdner rdner added the flaky-test Unstable or unreliable test cases. label Jan 20, 2024
@rdner
Copy link
Member Author

rdner commented Jan 24, 2024

Another, possibly related failure in TestStandaloneUpgradeUninstallKillWatcher:

Error: error uninstalling agent: failed to remove installation directory (C:\Program Files\Elastic\Agent): timed out while removing "C:\\Program Files\\Elastic\\Agent". Last error: remove C:\Program Files\Elastic\Agent\data\elastic-agent-b50dd5\elastic-agent.exe: Access is denied.
        	            	For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.13/fleet-troubleshooting.html
    fixture_install.go:165: [test TestStandaloneUpgradeUninstallKillWatcher] Inside fixture cleanup function
    fixture_install.go:180: collecting diagnostics; test failed
    fixture.go:624: >> running binary with: [C:\Program Files\Elastic\Agent\elastic-agent.exe diagnostics -f C:\Users\windows\agent\build\diagnostics\TestStandaloneUpgradeUninstallKillWatcher-diagnostics-2024-01-23T19-38-07Z.zip]
    fixture_install.go:306: failed to collect diagnostics to C:\Users\windows\agent\build\diagnostics\TestStandaloneUpgradeUninstallKillWatcher-diagnostics-2024-01-23T19-38-07Z.zip (exec: "C:\\Program Files\\Elastic\\Agent\\elastic-agent.exe": file does not exist): 
    fixture_install.go:319: creating zip archive of the installation directory: C:\Program Files\Elastic\Agent
    fixture.go:624: >> running binary with: [C:\Program Files\Elastic\Agent\elastic-agent.exe uninstall --force]
    fixture_install.go:215: 
        	Error Trace:	C:/Users/windows/agent/pkg/testing/fixture_install.go:215
        	            				C:/Program Files/Go/src/testing/testing.go:1169
        	            				C:/Program Files/Go/src/testing/testing.go:1347
        	            				C:/Program Files/Go/src/testing/testing.go:1589
        	Error:      	Received unexpected error:
        	            	error running uninstall command: exec: "C:\\Program Files\\Elastic\\Agent\\elastic-agent.exe": file does not exist
        	Test:       	TestStandaloneUpgradeUninstallKillWatcher
        	Messages:   	uninstalling agent failed. Output: ""

This time file does not exist, not a permission issue.

@rdner
Copy link
Member Author

rdner commented Jan 26, 2024

Fixed by #4146

@rdner rdner closed this as completed Jan 26, 2024
@rdner
Copy link
Member Author

rdner commented Jan 31, 2024

@leehinman @cmacknz the issue is back #4164

This time in the serverless tests.

@rdner
Copy link
Member Author

rdner commented Jan 31, 2024

After talking to @leehinman we concluded it's a different issue, so closing this one.

@rdner rdner closed this as completed Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip flaky-test Unstable or unreliable test cases. Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

No branches or pull requests

4 participants