summaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-14 22:54:56 +0200
committerGitHub <noreply@github.com>2019-06-14 22:54:56 +0200
commitaa2992dec69c73626a2a57d335b8641f203afd16 (patch)
tree2199d46fd890b51619e41714ae5ee6a41931a691 /libpod/runtime_ctr.go
parent4a450d55d95fbd02e45206c6c3ef7637d5c49656 (diff)
parent49e696642d4d2d08bb89d6968f50ef9d6f17361a (diff)
downloadpodman-aa2992dec69c73626a2a57d335b8641f203afd16.tar.gz
podman-aa2992dec69c73626a2a57d335b8641f203afd16.tar.bz2
podman-aa2992dec69c73626a2a57d335b8641f203afd16.zip
Merge pull request #3330 from mheon/remote_storage
Add --storage flag to 'podman rm' (local only)
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index cf1f5701d..0871b83a7 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -9,9 +9,7 @@ import (
"time"
"github.com/containers/libpod/libpod/events"
- "github.com/containers/libpod/libpod/image"
"github.com/containers/libpod/pkg/rootless"
- "github.com/containers/storage"
"github.com/containers/storage/pkg/stringid"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
@@ -614,16 +612,3 @@ func (r *Runtime) GetLatestContainer() (*Container, error) {
}
return ctrs[lastCreatedIndex], nil
}
-
-// RemoveContainersFromStorage attempt to remove containers from storage that do not exist in libpod database
-func (r *Runtime) RemoveContainersFromStorage(ctrs []string) {
- for _, i := range ctrs {
- // if the container does not exist in database, attempt to remove it from storage
- if _, err := r.LookupContainer(i); err != nil && errors.Cause(err) == image.ErrNoSuchCtr {
- r.storageService.UnmountContainerImage(i, true)
- if err := r.storageService.DeleteContainer(i); err != nil && errors.Cause(err) != storage.ErrContainerUnknown {
- logrus.Errorf("Failed to remove container %q from storage: %s", i, err)
- }
- }
- }
-}