mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Merge pull request #92779 from fisherxu/patch-2
Return err when create ContainerLogsDir failed
This commit is contained in:
commit
a6378d8b12
@ -1247,7 +1247,7 @@ func (kl *Kubelet) initializeModules() error {
|
||||
// If the container logs directory does not exist, create it.
|
||||
if _, err := os.Stat(ContainerLogsDir); err != nil {
|
||||
if err := kl.os.MkdirAll(ContainerLogsDir, 0755); err != nil {
|
||||
klog.Errorf("Failed to create directory %q: %v", ContainerLogsDir, err)
|
||||
return fmt.Errorf("failed to create directory %q: %v", ContainerLogsDir, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user