Merge pull request #107116 from yxxhero/add_more_msg_for_no_podsandbox_container

add more message for no PodSandbox container
This commit is contained in:
Kubernetes Prow Robot 2022-01-06 08:58:09 -08:00 committed by GitHub
commit 0b9ad84973
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -797,7 +797,7 @@ func buildContainerMapFromRuntime(runtimeService internalapi.RuntimeService) (co
containerList, _ := runtimeService.ListContainers(nil)
for _, c := range containerList {
if _, exists := podSandboxMap[c.PodSandboxId]; !exists {
return nil, fmt.Errorf("no PodsandBox found with Id '%s'", c.PodSandboxId)
return nil, fmt.Errorf("no PodsandBox found with Id '%s' for container with ID '%s' and Name '%s'", c.PodSandboxId, c.Id, c.Metadata.Name)
}
containerMap.Add(podSandboxMap[c.PodSandboxId], c.Metadata.Name, c.Id)
}