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:
@@ -797,7 +797,7 @@ func buildContainerMapFromRuntime(runtimeService internalapi.RuntimeService) (co
|
|||||||
containerList, _ := runtimeService.ListContainers(nil)
|
containerList, _ := runtimeService.ListContainers(nil)
|
||||||
for _, c := range containerList {
|
for _, c := range containerList {
|
||||||
if _, exists := podSandboxMap[c.PodSandboxId]; !exists {
|
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)
|
containerMap.Add(podSandboxMap[c.PodSandboxId], c.Metadata.Name, c.Id)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user