Skip to content

Commit

Permalink
Add more logging for Mount error
Browse files Browse the repository at this point in the history
Add additional logging for "Mount cannot be satisfied for container"
error to help debug #85330.
  • Loading branch information
saad-ali committed Dec 16, 2020
1 parent e33abf2 commit 38a2e63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kubelet/kubelet_pods.go
Expand Up @@ -144,7 +144,7 @@ func makeMounts(pod *v1.Pod, podDir string, container *v1.Container, hostName, h
mountEtcHostsFile = mountEtcHostsFile && (mount.MountPath != etcHostsPath)
vol, ok := podVolumes[mount.Name]
if !ok || vol.Mounter == nil {
klog.Errorf("Mount cannot be satisfied for container %q, because the volume is missing or the volume mounter is nil: %+v", container.Name, mount)
klog.Errorf("Mount cannot be satisfied for container %q, because the volume is missing (ok=%v) or the volume mounter (vol.Mounter) is nil (vol=%+v): %+v", container.Name, ok, vol, mount)
return nil, cleanupAction, fmt.Errorf("cannot find volume %q to mount into container %q", mount.Name, container.Name)
}

Expand Down

0 comments on commit 38a2e63

Please sign in to comment.