Skip to content

Commit

Permalink
rename status unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
pengweisong committed Feb 8, 2022
1 parent bf591e2 commit ef7bbee
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 41 deletions.
4 changes: 2 additions & 2 deletions internal/clients/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (d *ServiceDaemon) Status() (pb.Status, error) {
outByte, err := cmd.Output()
if err != nil {
log.WithError(err).Errorf("Get status of service %s failed", d.s.name)
return pb.Status_UNKNOWN, err
return pb.Status_UNKNOWN_STATUS, err
}

// Note: depend on the nebula scripts output now.
Expand All @@ -127,5 +127,5 @@ func (d *ServiceDaemon) Status() (pb.Status, error) {
return pb.Status_RUNNING, nil
}

return pb.Status_UNKNOWN, fmt.Errorf("unrecognized output: '%s'", outStr)
return pb.Status_UNKNOWN_STATUS, fmt.Errorf("unrecognized output: '%s'", outStr)
}
2 changes: 1 addition & 1 deletion internal/server/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (a *AgentServer) StopService(ctx context.Context, req *pb.StopServiceReques
// ServiceStatus return the status(exit or running) of metad/storaged/graphd/all service in agent machine
func (a *AgentServer) ServiceStatus(ctx context.Context, req *pb.ServiceStatusRequest) (*pb.ServiceStatusResponse, error) {
resp := &pb.ServiceStatusResponse{
Status: pb.Status_UNKNOWN,
Status: pb.Status_UNKNOWN_STATUS,
}

d, err := clients.NewDaemon(clients.FromStatusReq(req))
Expand Down
74 changes: 37 additions & 37 deletions pkg/proto/agent.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ enum ServiceRole {
}

enum Status {
UNKNOWN = 0;
UNKNOWN_STATUS = 0;
RUNNING = 1;
EXITED = 2;
}
Expand Down

0 comments on commit ef7bbee

Please sign in to comment.