server: issues.k8s.io/44043 workaround
Because kubelet will create broken symlinks for logPath it is necessary to remove those symlinks before we attempt to write to them. This is a temporary workaround while the issue is fixed upstream. Ref: https://issues.k8s.io/44043 Signed-off-by: Aleksa Sarai <asarai@suse.de>
This commit is contained in:
parent
65527da361
commit
7679a84c6d
2 changed files with 33 additions and 0 deletions
|
@ -255,6 +255,11 @@ func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest
|
|||
// set log path inside log directory
|
||||
logPath := filepath.Join(logDir, id+".log")
|
||||
|
||||
// Handle https://issues.k8s.io/44043
|
||||
if err := ensureSaneLogPath(logPath); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
privileged := s.privilegedSandbox(req)
|
||||
g.AddAnnotation("ocid/metadata", string(metadataJSON))
|
||||
g.AddAnnotation("ocid/labels", string(labelsJSON))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue