diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_internal.go | 10 | ||||
-rw-r--r-- | libpod/runtime_cstorage.go | 6 |
2 files changed, 15 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go index ac565fdad..0b5a8b946 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -163,7 +163,15 @@ func (c *Container) createExecBundle(sessionID string) (err error) { // cleanup an exec session after its done func (c *Container) cleanupExecBundle(sessionID string) error { - return os.RemoveAll(c.execBundlePath(sessionID)) + if err := os.RemoveAll(c.execBundlePath(sessionID)); err != nil && !os.IsNotExist(err) { + return err + } + // Clean up the sockets dir. Issue #3962 + // Also ignore if it doesn't exist for some reason; hence the conditional return below + if err := os.RemoveAll(filepath.Join(c.ociRuntime.socketsDir, sessionID)); err != nil && !os.IsNotExist(err) { + return err + } + return nil } // the path to a containers exec session bundle diff --git a/libpod/runtime_cstorage.go b/libpod/runtime_cstorage.go index 586db5a1e..1e84aef4b 100644 --- a/libpod/runtime_cstorage.go +++ b/libpod/runtime_cstorage.go @@ -1,6 +1,8 @@ package libpod import ( + "time" + "github.com/containers/libpod/libpod/define" "github.com/containers/storage" "github.com/pkg/errors" @@ -12,6 +14,8 @@ import ( type StorageContainer struct { ID string Names []string + Image string + CreateTime time.Time PresentInLibpod bool } @@ -31,6 +35,8 @@ func (r *Runtime) ListStorageContainers() ([]*StorageContainer, error) { storageCtr := new(StorageContainer) storageCtr.ID = ctr.ID storageCtr.Names = ctr.Names + storageCtr.Image = ctr.ImageID + storageCtr.CreateTime = ctr.Created // Look up if container is in state hasCtr, err := r.state.HasContainer(ctr.ID) |