From 2f34129ae0917781fcb41a358c4afbd380e511fa Mon Sep 17 00:00:00 2001 From: Wentao Zhang Date: Fri, 1 Jul 2016 14:46:41 +0000 Subject: [PATCH] fix volume driver deletions prevents recreation of volume issue Signed-off-by: Wentao Zhang Upstream-commit: 64d0592d41e96ac5c522c21d9270485e72c80231 Component: engine --- components/engine/volume/store/store.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/engine/volume/store/store.go b/components/engine/volume/store/store.go index 807ad1495a..adb5d7d236 100644 --- a/components/engine/volume/store/store.go +++ b/components/engine/volume/store/store.go @@ -269,7 +269,10 @@ func (s *VolumeStore) create(name, driverName string, opts, labels map[string]st if v.DriverName() != driverName && driverName != "" && driverName != volume.DefaultDriverName { return nil, errNameConflict } - return v, nil + // check exist in driver + if driverName == "" || driverName == volume.DefaultDriverName { + return v, nil + } } // Since there isn't a specified driver name, let's see if any of the existing drivers have this volume name