[windows] move service startup to beginning of run function #4971
Labels
bug
Something isn't working
good first issue
Good for newcomers
Team:Elastic-Agent-Control-Plane
Label for the Agent Control Plane team
Currently
elastic-agent
does several things before it communicates with the Windows Service Manager and registers itself and reports as running.elastic-agent/internal/pkg/agent/cmd/run.go
Line 143 in 81e112d
This can cause problems because the service manager has a very short timeout between when it starts a process and expects that process to communicate that it is in StartPending state. For Windows we need to move this as close as possible to the start of the run function.
The text was updated successfully, but these errors were encountered: