diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-07-23 16:30:23 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-07-24 02:25:11 +0000 |
commit | 3c5ce9b8bfabc737822861583ede4807f245d7ab (patch) | |
tree | 0375ea08b7bf397ba7037201891744711dcf8dd7 /cmd | |
parent | 9a18681ba62d1a297809c243607a7b3763131c36 (diff) | |
download | podman-3c5ce9b8bfabc737822861583ede4807f245d7ab.tar.gz podman-3c5ce9b8bfabc737822861583ede4807f245d7ab.tar.bz2 podman-3c5ce9b8bfabc737822861583ede4807f245d7ab.zip |
Update container Mounted() and Mountpoint() functions
Addresses a regression in `podman mount` due to our mount changes
to allow concurrency by letting c/storage handle mounting and
unmounting.
Combine Mounted() and Mountpoint() into one function and query
c/storage directly to ensure we get accurate information.
Fixes: #1143
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes: #1144
Approved by: baude
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/mount.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/podman/mount.go b/cmd/podman/mount.go index b053ef1e8..df1bacc5f 100644 --- a/cmd/podman/mount.go +++ b/cmd/podman/mount.go @@ -105,13 +105,15 @@ func mountCmd(c *cli.Context) error { return errors.Wrapf(err2, "error reading list of all containers") } for _, container := range containers { - mountPoint, err := container.Mountpoint() + mounted, mountPoint, err := container.Mounted() if err != nil { return errors.Wrapf(err, "error getting mountpoint for %q", container.ID()) } - if mountPoint == "" { + + if !mounted { continue } + if json { jsonMountPoints = append(jsonMountPoints, jsonMountPoint{ID: container.ID(), Names: []string{container.Name()}, MountPoint: mountPoint}) continue |