mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 05:36:12 +00:00
Merge pull request #16191 from yujuhong/fix_logs
Auto commit by PR queue bot
This commit is contained in:
@@ -2223,7 +2223,11 @@ func (kl *Kubelet) GetKubeletContainerLogs(podFullName, containerName string, lo
|
||||
return fmt.Errorf("unable to get logs for container %q in pod %q namespace %q: unable to find pod", containerName, name, namespace)
|
||||
}
|
||||
|
||||
podStatus, found := kl.statusManager.GetPodStatus(pod.UID)
|
||||
podUID := pod.UID
|
||||
if mirrorPod, ok := kl.podManager.GetMirrorPodByPod(pod); ok {
|
||||
podUID = mirrorPod.UID
|
||||
}
|
||||
podStatus, found := kl.statusManager.GetPodStatus(podUID)
|
||||
if !found {
|
||||
return fmt.Errorf("failed to get status for pod %q in namespace %q", name, namespace)
|
||||
}
|
||||
|
Reference in New Issue
Block a user