mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Return err when create ContainerLogsDir failed
This commit is contained in:
parent
d5f76a9c6f
commit
34826c82be
@ -1269,7 +1269,7 @@ func (kl *Kubelet) initializeModules() error {
|
|||||||
// If the container logs directory does not exist, create it.
|
// If the container logs directory does not exist, create it.
|
||||||
if _, err := os.Stat(ContainerLogsDir); err != nil {
|
if _, err := os.Stat(ContainerLogsDir); err != nil {
|
||||||
if err := kl.os.MkdirAll(ContainerLogsDir, 0755); 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