Skip to content

Commit

Permalink
cmd/run: Fix libcontainer bug with dirty directory
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Jung <a.jung@lancs.ac.uk>
  • Loading branch information
nderjung committed Jan 11, 2021
1 parent c885d54 commit dcfc63d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,15 @@ func cleanup() {
activeJob.Cleanup()
}

// Fix a weird libcontainer bug where if the directory still exists it thinks
// the container is still active.
libContainerCacheDir := path.Join(runConfig.WorkDir, ".cache", "libcontainer")
log.Debugf("Deleting %s...", libContainerCacheDir)
err := os.RemoveAll(libContainerCacheDir)
if err != nil {
log.Warnf("Could not delete container cache: %s", err)
}

job.RevertEnvironment(runConfig.DryRun)

// TODO: Clean up bridge
Expand Down

0 comments on commit dcfc63d

Please sign in to comment.