mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #102268 from sanwishe/loggingformat1
cleanup: Optimization logging format for pkg/kubelet
This commit is contained in:
commit
49897ca156
@ -1095,7 +1095,7 @@ func (m *ManagerImpl) GetAllocatableDevices() ResourceDeviceInstances {
|
|||||||
m.mutex.Lock()
|
m.mutex.Lock()
|
||||||
resp := m.allDevices.Clone()
|
resp := m.allDevices.Clone()
|
||||||
m.mutex.Unlock()
|
m.mutex.Unlock()
|
||||||
klog.V(4).InfoS("known devices", "numDevices", len(resp))
|
klog.V(4).InfoS("Known devices", "numDevices", len(resp))
|
||||||
return resp
|
return resp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1427,7 +1427,7 @@ func (kl *Kubelet) Run(updates <-chan kubetypes.PodUpdate) {
|
|||||||
|
|
||||||
if err := kl.initializeModules(); err != nil {
|
if err := kl.initializeModules(); err != nil {
|
||||||
kl.recorder.Eventf(kl.nodeRef, v1.EventTypeWarning, events.KubeletSetupFailed, err.Error())
|
kl.recorder.Eventf(kl.nodeRef, v1.EventTypeWarning, events.KubeletSetupFailed, err.Error())
|
||||||
klog.ErrorS(err, "failed to initialize internal modules")
|
klog.ErrorS(err, "Failed to initialize internal modules")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1639,7 +1639,7 @@ func (kl *Kubelet) syncPod(o syncPodOptions) error {
|
|||||||
if err := kl.killPod(pod, nil, podStatus, nil); err == nil {
|
if err := kl.killPod(pod, nil, podStatus, nil); err == nil {
|
||||||
podKilled = true
|
podKilled = true
|
||||||
} else {
|
} else {
|
||||||
klog.ErrorS(err, "killPod failed", "pod", klog.KObj(pod), "podStatus", podStatus)
|
klog.ErrorS(err, "KillPod failed", "pod", klog.KObj(pod), "podStatus", podStatus)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Create and Update pod's Cgroups
|
// Create and Update pod's Cgroups
|
||||||
|
@ -566,7 +566,7 @@ func (m *manager) syncPod(uid types.UID, status versionedPodStatus) {
|
|||||||
klog.InfoS("Failed to get status for pod",
|
klog.InfoS("Failed to get status for pod",
|
||||||
"podUID", uid,
|
"podUID", uid,
|
||||||
"pod", klog.KRef(status.podNamespace, status.podName),
|
"pod", klog.KRef(status.podNamespace, status.podName),
|
||||||
"error", err)
|
"err", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,7 +408,7 @@ func (rc *reconciler) syncStates() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// No pod needs the volume.
|
// No pod needs the volume.
|
||||||
klog.InfoS("Could not construct volume information, cleaning up mounts", "podName", volume.podName, "volumeSpecName", volume.volumeSpecName, "error", err)
|
klog.InfoS("Could not construct volume information, cleaning up mounts", "podName", volume.podName, "volumeSpecName", volume.volumeSpecName, "err", err)
|
||||||
rc.cleanupMounts(volume)
|
rc.cleanupMounts(volume)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user