mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-18 08:09:58 +00:00
Merge pull request #37680 from mfojtik/report-pod-name
Automatic merge from submit-queue Report the Pod name and namespace when kubelet fails to sync the container This helps debugging problems with SELinux (and other problems related to the Docker failed to run the container) as currently only the UUID of the Pod is reported: ``` Error syncing pod 670f607d-b5a8-11a4-b673-005056b7468b, skipping: failed to "StartContainer" for "deployment" with RunContainerError: "runContainer: Error response from daemon: Relabeling content in /usr is not allowed." ``` Here it would be useful to know what pod in which namespace is trying to mount the "/usr".
This commit is contained in:
commit
d270ec0ed2
@ -31,6 +31,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/kubelet/events"
|
||||
"k8s.io/kubernetes/pkg/kubelet/eviction"
|
||||
kubetypes "k8s.io/kubernetes/pkg/kubelet/types"
|
||||
"k8s.io/kubernetes/pkg/kubelet/util/format"
|
||||
"k8s.io/kubernetes/pkg/kubelet/util/queue"
|
||||
)
|
||||
|
||||
@ -178,7 +179,7 @@ func (p *podWorkers) managePodLoop(podUpdates <-chan UpdatePodOptions) {
|
||||
update.OnCompleteFunc(err)
|
||||
}
|
||||
if err != nil {
|
||||
glog.Errorf("Error syncing pod %s, skipping: %v", update.Pod.UID, err)
|
||||
glog.Errorf("Error syncing pod %s (%q), skipping: %v", update.Pod.UID, format.Pod(update.Pod), err)
|
||||
p.recorder.Eventf(update.Pod, v1.EventTypeWarning, events.FailedSync, "Error syncing pod, skipping: %v", err)
|
||||
}
|
||||
p.wrapUp(update.Pod.UID, err)
|
||||
|
Loading…
Reference in New Issue
Block a user