Uninstall does not stop a running watcher after upgrade #3371
Closed
Description
In the case that the Elastic Agent was recently upgraded (aka. inside the 10 minute watcher grace period) running elastic-agent uninstall
does not stop the running watcher.
This causes a host of problems:
- Uninstall on Windows completely fails
- This is because the watcher is writing to its log file and Windows prevents removal of the log directory because the watcher is still running and writing to that log file.
- Sequence uninstall/re-install within the grace period causes corrupted Elastic Agent
- The Elastic Agent will uninstall correctly, but if Elastic Agent is re-installed within the 10 minute grace period the watcher will then notice that the Elastic Agent is not health and result in a rollback to be performed. This rollback results in a corrupted Elastic Agent installation.
For confirmed bugs, please report:
- Version: All
- Operating System: All
Activity