summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r--libpod/runtime.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index 103faf3f8..36225bf69 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -273,7 +273,13 @@ func (r *Runtime) Shutdown(force bool) error {
// Refreshes the state, recreating temporary files
// Does not check validity as the runtime is not valid until after this has run
func (r *Runtime) refresh(alivePath string) error {
- // We need to refresh the state of all containers
+ // First clear the state in the database
+ if err := r.state.Refresh(); err != nil {
+ return err
+ }
+
+ // Next refresh the state of all containers to recreate dirs and
+ // namespaces
ctrs, err := r.state.AllContainers()
if err != nil {
return errors.Wrapf(err, "error retrieving all containers from state")