mirror of
https://github.com/moby/moby.git
synced 2025-07-29 07:21:35 +03:00
Ensure unmount before removing local volume.
When there is an error unmounting a local volume, it is still possible to call `Remove()` on the volume causing removal of the mounted resources which is generally not desirable. This ensures that resources are unmounted before attempting removal. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
@ -88,8 +88,8 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithVolumesRefs(c *check.C) {
|
||||
|
||||
s.d.Restart(c)
|
||||
|
||||
if _, err := s.d.Cmd("run", "-d", "--volumes-from", "volrestarttest1", "--name", "volrestarttest2", "busybox", "top"); err != nil {
|
||||
c.Fatal(err)
|
||||
if out, err := s.d.Cmd("run", "-d", "--volumes-from", "volrestarttest1", "--name", "volrestarttest2", "busybox", "top"); err != nil {
|
||||
c.Fatal(err, out)
|
||||
}
|
||||
|
||||
if out, err := s.d.Cmd("rm", "-fv", "volrestarttest2"); err != nil {
|
||||
|
Reference in New Issue
Block a user