From b4857dffa8ba0a7b2fe779a0b2264ce1b0b2e7ff Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 19 Jun 2014 15:24:22 -0400 Subject: [PATCH] sqlite-3.6.20-1 unique constraint message https://github.com/dotcloud/docker/issues/6551 Docker-DCO-1.1-Signed-off-by: Vincent Batts (github: vbatts) --- pkg/graphdb/graphdb.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/graphdb/graphdb.go b/pkg/graphdb/graphdb.go index 46a23b1e7b..d0e049b07f 100644 --- a/pkg/graphdb/graphdb.go +++ b/pkg/graphdb/graphdb.go @@ -64,6 +64,11 @@ func IsNonUniqueNameError(err error) bool { if strings.Contains(str, "UNIQUE constraint failed") && strings.Contains(str, "edge.name") { return true } + // sqlite-3.6.20-1.el6 returns: + // Set failure: Abort due to constraint violation: constraint failed + if strings.HasSuffix(str, "constraint failed") { + return true + } return false }