Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
kata-agent: Improve error message.
Browse files Browse the repository at this point in the history
If the grpc connection check fails we only return the grpc error.
To make more clear what failed add more information to the error.

Signed-off-by: Jose Carlos Venegas Munoz <[email protected]>
  • Loading branch information
jcvenegas authored and Eric Ernst committed Aug 23, 2018
1 parent 7ca24d6 commit 28b299f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions virtcontainers/kata_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -1148,8 +1148,12 @@ func (k *kataAgent) disconnect() error {
return nil
}

// check grpc server is serving
func (k *kataAgent) check() error {
_, err := k.sendReq(&grpc.CheckRequest{})
if err != nil {
err = fmt.Errorf("Failed to check if grpc server is working: %s", err)
}
return err
}

Expand Down

0 comments on commit 28b299f

Please sign in to comment.