mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
pkg/kubelet: fix wrong code path in runContainer
This commit is contained in:
parent
13bb378d1c
commit
2437e94248
@ -683,11 +683,13 @@ func (kl *Kubelet) runContainer(pod *api.BoundPod, container *api.Container, pod
|
||||
containerLogPath := path.Join(p, dockerContainer.ID)
|
||||
fs, err := os.Create(containerLogPath)
|
||||
if err != nil {
|
||||
// TODO: Clean up the previouly created dir? return the error?
|
||||
glog.Errorf("Error on creating termination-log file %q: %v", containerLogPath, err)
|
||||
} else {
|
||||
defer fs.Close()
|
||||
b := fmt.Sprintf("%s:%s", containerLogPath, container.TerminationMessagePath)
|
||||
binds = append(binds, b)
|
||||
}
|
||||
defer fs.Close()
|
||||
b := fmt.Sprintf("%s:%s", containerLogPath, container.TerminationMessagePath)
|
||||
binds = append(binds, b)
|
||||
}
|
||||
}
|
||||
privileged := false
|
||||
|
Loading…
Reference in New Issue
Block a user