Skip to content

Commit

Permalink
Revert "Stop ignoring errors in sub-agent startup (#59)" (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
qingling128 authored Apr 22, 2021
1 parent 2c14157 commit 387c129
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/ops_agent_windows/run_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ func (s *service) Execute(args []string, r <-chan svc.ChangeRequest, changes cha
changes <- svc.Status{State: svc.Running, Accepts: cmdsAccepted}
if err := s.startSubagents(); err != nil {
s.log.Error(1, fmt.Sprintf("failed to start subagents: %v", err))
// ERROR_SERVICE_DEPENDENCY_FAIL
return false, 0x0000042C
// TODO: Ignore failures for partial startup?
}
s.log.Info(1, "started subagents")
defer func() {
Expand Down Expand Up @@ -150,7 +149,8 @@ func (s *service) startSubagents() error {
}
defer handle.Close()
if err := handle.Start(); err != nil {
return fmt.Errorf("failed to start %q: %v", svc.name, err)
// TODO: Should we be ignoring failures for partial startup?
s.log.Error(1, fmt.Sprintf("failed to start %q: %v", svc.name, err))
}
}
return nil
Expand Down

0 comments on commit 387c129

Please sign in to comment.