sandbox: do retry for wait to remote sandbox controller

remote sandbox controller may restart, the Wait call should be retried
if it is an grpc disconnetion error.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
This commit is contained in:
Abel Feng
2024-05-10 10:18:42 +08:00
parent b168147ca8
commit 58be881890
2 changed files with 27 additions and 4 deletions

View File

@@ -53,7 +53,7 @@ func (c *criService) startSandboxExitMonitor(ctx context.Context, id string, exi
case exitRes := <-exitCh:
exitStatus, exitedAt, err := exitRes.Result()
if err != nil {
log.L.WithError(err).Errorf("failed to get task exit status for %q", id)
log.L.WithError(err).Errorf("failed to get sandbox status for %q", id)
exitStatus = unknownExitCode
exitedAt = time.Now()
}