summaryrefslogtreecommitdiff
path: root/libpod/container_inspect.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-02-23 03:26:59 -0500
committerGitHub <noreply@github.com>2022-02-23 03:26:59 -0500
commit8b2432422fc188e15130c888a05e41fd881b8ca4 (patch)
tree403f0337bd61a09a10e05762e0935cc9bf0ad0d0 /libpod/container_inspect.go
parentccb96a2791fe9ae58a697bf1715600ecec8b246b (diff)
parentc4dfbd58f5eb3851e031a5abfdbd9364e1779eb2 (diff)
downloadpodman-8b2432422fc188e15130c888a05e41fd881b8ca4.tar.gz
podman-8b2432422fc188e15130c888a05e41fd881b8ca4.tar.bz2
podman-8b2432422fc188e15130c888a05e41fd881b8ca4.zip
Merge pull request #13232 from rhatdan/volumes
Don't log errors on removing volumes inuse, if container --volumes-from
Diffstat (limited to 'libpod/container_inspect.go')
-rw-r--r--libpod/container_inspect.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go
index 07b28ba93..3df6203e3 100644
--- a/libpod/container_inspect.go
+++ b/libpod/container_inspect.go
@@ -51,6 +51,17 @@ func (c *Container) Inspect(size bool) (*define.InspectContainerData, error) {
return c.inspectLocked(size)
}
+func (c *Container) volumesFrom() ([]string, error) {
+ ctrSpec, err := c.specFromState()
+ if err != nil {
+ return nil, err
+ }
+ if ctrs, ok := ctrSpec.Annotations[define.InspectAnnotationVolumesFrom]; ok {
+ return strings.Split(ctrs, ","), nil
+ }
+ return nil, nil
+}
+
func (c *Container) getContainerInspectData(size bool, driverData *define.DriverData) (*define.InspectContainerData, error) {
config := c.config
runtimeInfo := c.state