From d96e8853145ed6a03529e093c49b91f0053472a6 Mon Sep 17 00:00:00 2001 From: Michal Minar <miminar@redhat.com> Date: Tue, 24 Feb 2015 12:42:51 +0100 Subject: [PATCH] Fixed bad handling of "container not found" error Create container job could fail because a container specified with `--volumes-from` does not exist. This error is not propagated to client though. Instead it's recognized by higher levels as "image not found". Client then tries to pull the image and launch the container again. This patch changes the lower level error message so that it's not recognized as "image not found" and thus it's propagated to client. Signed-off-by: Michal Minar <miminar@redhat.com> --- daemon/volumes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/volumes.go b/daemon/volumes.go index acc35a2675..c9007615c0 100644 --- a/daemon/volumes.go +++ b/daemon/volumes.go @@ -279,7 +279,7 @@ func (container *Container) applyVolumesFrom() error { c, err := container.daemon.Get(id) if err != nil { - return err + return fmt.Errorf("Could not apply volumes of non-existent container %q.", id) } var (