mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Merge pull request #106353 from gjkim42/remove-false-pleg-errors
kubelet: Remove false PLEG errors
This commit is contained in:
commit
5f4914604d
@ -405,12 +405,18 @@ func (g *GenericPLEG) updateCache(pod *kubecontainer.Pod, pid types.UID) error {
|
|||||||
// GetPodStatus(pod *kubecontainer.Pod) so that Docker can avoid listing
|
// GetPodStatus(pod *kubecontainer.Pod) so that Docker can avoid listing
|
||||||
// all containers again.
|
// all containers again.
|
||||||
status, err := g.runtime.GetPodStatus(pod.ID, pod.Name, pod.Namespace)
|
status, err := g.runtime.GetPodStatus(pod.ID, pod.Name, pod.Namespace)
|
||||||
if klog.V(6).Enabled() {
|
if err != nil {
|
||||||
klog.V(6).ErrorS(err, "PLEG: Write status", "pod", klog.KRef(pod.Namespace, pod.Name), "podStatus", status)
|
if klog.V(6).Enabled() {
|
||||||
|
klog.V(6).ErrorS(err, "PLEG: Write status", "pod", klog.KRef(pod.Namespace, pod.Name), "podStatus", status)
|
||||||
|
} else {
|
||||||
|
klog.V(4).ErrorS(err, "PLEG: Write status", "pod", klog.KRef(pod.Namespace, pod.Name))
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
klog.V(4).ErrorS(err, "PLEG: Write status", "pod", klog.KRef(pod.Namespace, pod.Name))
|
if klog.V(6).Enabled() {
|
||||||
}
|
klog.V(6).InfoS("PLEG: Write status", "pod", klog.KRef(pod.Namespace, pod.Name), "podStatus", status)
|
||||||
if err == nil {
|
} else {
|
||||||
|
klog.V(4).InfoS("PLEG: Write status", "pod", klog.KRef(pod.Namespace, pod.Name))
|
||||||
|
}
|
||||||
// Preserve the pod IP across cache updates if the new IP is empty.
|
// Preserve the pod IP across cache updates if the new IP is empty.
|
||||||
// When a pod is torn down, kubelet may race with PLEG and retrieve
|
// When a pod is torn down, kubelet may race with PLEG and retrieve
|
||||||
// a pod status after network teardown, but the kubernetes API expects
|
// a pod status after network teardown, but the kubernetes API expects
|
||||||
|
Loading…
Reference in New Issue
Block a user