-
Notifications
You must be signed in to change notification settings - Fork 148
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 on Windows cannot be stopped or removed if --delay-enroll is retrying #4972
Comments
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
Unfortunately as I don't have a Windows setup I didn't test it but is it working if you are doing |
Interesting because the loop clearly watches for the context to be cancelled and doesn't continue. That context also gets cancelled when the signal is given to the process. This is strange behaviour: elastic-agent/internal/pkg/agent/cmd/run.go Lines 572 to 580 in 00d7268
|
@blakerouse did you try to reproduce or not yet? (just for me to understand where we are with the investigations) |
I have not tried to reproduce, just providing code context. Some times these issues are easy to fix by just looking at the code and noticing an error. |
As part of the original PR I did try this on a Windows machine and it let me uninstall: #4727 (comment) However it is possible something has changed since I tested it originally. |
per elastic/elastic-stack-installers#277 and likely caused by #4800
The Elastic Agent on Windows is unable to be stopped after the service is started post a --delay-enroll installation if the enrollment cannot be completed.
To reproduce:
elastic-agent uninstall
The agent service should respond to stop requests even if enrollment is failing, and uninstall should not be blocked by bad enrollment information.
The text was updated successfully, but these errors were encountered: