Skip to content

Commit

Permalink
Merge pull request #7551 from samuelkarp/ip-leakage-flake/1.6
Browse files Browse the repository at this point in the history
[release/1.6] cri: PodSandboxStatus should tolerate missing task
  • Loading branch information
kzys committed Oct 18, 2022
2 parents 74e9e4c + a9adc79 commit 9edb143
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/cri/server/sandbox_status.go
Expand Up @@ -155,12 +155,14 @@ func toCRISandboxInfo(ctx context.Context, sandbox sandboxstore.Sandbox) (map[st

var processStatus containerd.ProcessStatus
if task != nil {
taskStatus, err := task.Status(ctx)
if err != nil {
return nil, fmt.Errorf("failed to get task status: %w", err)
if taskStatus, err := task.Status(ctx); err != nil {
if !errdefs.IsNotFound(err) {
return nil, fmt.Errorf("failed to get task status: %w", err)
}
processStatus = containerd.Unknown
} else {
processStatus = taskStatus.Status
}

processStatus = taskStatus.Status
}

si := &SandboxInfo{
Expand Down

0 comments on commit 9edb143

Please sign in to comment.