When Elastic Agent attempts to stop endpoint-security (which is not always the correct thing to do - see #11266), it will tear down the connection information server and ignore errors from the stop call which invokes endpoint-security uninstall.
|
// Stop connection info |
|
s.log.Debugf("stop connection info for %s service", s.name()) |
|
cisStop() |
|
|
|
// Stop service |
|
s.stop(ctx, comm, lastCheckin, am == actionTeardown) |
This does not consider that endpoint-security uninstall may return exit code 28/284 indicating it is refusing uninstall because it is tamper protected.
When endpoint refuses uninstall, we should leave the system in a state where endpoint can continue to communicate with agent.
When Elastic Agent attempts to stop endpoint-security (which is not always the correct thing to do - see #11266), it will tear down the connection information server and ignore errors from the
stopcall which invokesendpoint-security uninstall.elastic-agent/pkg/component/runtime/service.go
Lines 169 to 174 in 271901e
This does not consider that
endpoint-security uninstallmay return exit code 28/284 indicating it is refusing uninstall because it is tamper protected.When endpoint refuses uninstall, we should leave the system in a state where endpoint can continue to communicate with agent.