From 25c7a7cee36fe879c51fc1fd7b721e672d1e3dfd Mon Sep 17 00:00:00 2001 From: Shahzeb Patel Date: Sun, 27 Aug 2017 15:52:53 -0700 Subject: [PATCH] Do not log error for GetVolume with volume for empty names (#1828) --- client_plugin/drivers/vmdk/vmdk_driver.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client_plugin/drivers/vmdk/vmdk_driver.go b/client_plugin/drivers/vmdk/vmdk_driver.go index 89afdd2e8..03742e880 100644 --- a/client_plugin/drivers/vmdk/vmdk_driver.go +++ b/client_plugin/drivers/vmdk/vmdk_driver.go @@ -124,7 +124,14 @@ func (d *VolumeDriver) List(r volume.Request) volume.Response { // GetVolume - return volume meta-data. func (d *VolumeDriver) GetVolume(name string) (map[string]interface{}, error) { + // Get for empty volume name is issued by docker when it is coming up. Issue #1833 + // Just return the error in such case. + if name == "" { + return nil, fmt.Errorf(" No volume with name as empty string exists") + } + mdata, err := d.ops.Get(name) + if err != nil { log.WithFields(log.Fields{"name": name, "error": err}).Error("Failed to get volume meta-data ") }