mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-29 08:47:56 +00:00
kata-agent: Improve error message.
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 <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
67b5841153
commit
12e1911aab
@ -1229,8 +1229,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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user