Skip to content

Commit

Permalink
Merge pull request containers#6483 from mheon/cleanup_on_stop
Browse files Browse the repository at this point in the history
When stopping containers locally, ensure cleanup runs
  • Loading branch information
openshift-merge-robot authored Jun 3, 2020
2 parents 377554d + 61ea85b commit 986a277
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/domain/infra/abi/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin
report.Err = err
reports = append(reports, &report)
continue
} else if err := con.Cleanup(ctx); err != nil {
// Only if no error, proceed to cleanup to ensure all
// mounts are removed before we exit.
report.Err = err
reports = append(reports, &report)
continue
}
reports = append(reports, &report)
}
Expand Down

0 comments on commit 986a277

Please sign in to comment.