virtcontainers: fix kata-agent fail to start

If kata-agent doesn't start in VM, we need to do some rollback
operations to release related resources.

add grpc check() to check kata-agent is running or not

Fixes: #297

Signed-off-by: flyflypeng <jiangpengfei9@huawei.com>
This commit is contained in:
flyflypeng 2018-06-19 23:20:18 +08:00
parent 7103c4f14a
commit 2993cb3dd4

View File

@ -512,6 +512,11 @@ func (k *kataAgent) startSandbox(sandbox *Sandbox) error {
hostname = hostname[:maxHostnameLen] hostname = hostname[:maxHostnameLen]
} }
// check grpc server is serving
if err = k.check(); err != nil {
return err
}
// //
// Setup network interfaces and routes // Setup network interfaces and routes
// //