Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 60135e6

Browse files
authored
Merge pull request #360 from thaJeztah/19.03_backport_fix_missing_dir_cleanup_file
[19.03 backport] Ensure parent dir exists for mount cleanup file Upstream-commit: 6de2bd28dfc2e0b5482fa688d181d8ac7c7e60bf Component: engine
2 parents 190ac56 + aa860c4 commit 60135e6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

components/engine/daemon/daemon_unix.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,6 +1265,10 @@ func setupDaemonRootPropagation(cfg *config.Config) error {
12651265
return nil
12661266
}
12671267

1268+
if err := os.MkdirAll(filepath.Dir(cleanupFile), 0700); err != nil {
1269+
return errors.Wrap(err, "error creating dir to store mount cleanup file")
1270+
}
1271+
12681272
if err := ioutil.WriteFile(cleanupFile, nil, 0600); err != nil {
12691273
return errors.Wrap(err, "error writing file to signal mount cleanup on shutdown")
12701274
}

0 commit comments

Comments
 (0)