create logs dir on startup
Build and Publish / BuildAndDeployArm64 (push) Failing after 5s
Build and Publish / BuildAndDeployAmd64 (push) Failing after 2s

This commit is contained in:
2026-06-25 19:42:47 +02:00
parent 414395bc0d
commit 10812d4203
2 changed files with 10 additions and 1 deletions
+7
View File
@@ -147,6 +147,13 @@ func (s *DiskStorage[V]) AppendMutations(id uint64, msg ...proto.Message) error
return nil
} else {
path := s.logPath(id)
// Ensure the parent directory exists (e.g. first write to a new PVC mount).
// MkdirAll is a no-op when the directory already exists, so it's safe to
// call on every AppendMutations without extra stat overhead.
if err := os.MkdirAll(s.path, 0755); err != nil {
log.Printf("failed to create event log directory %s: %v", s.path, err)
return err
}
fh, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
log.Printf("failed to open event log file: %v", err)