Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Commit

Permalink
Do not log error for GetVolume with volume for empty names (#1828)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahzeb Patel authored and shuklanirdesh82 committed Aug 27, 2017
1 parent 1d46b99 commit 25c7a7c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client_plugin/drivers/vmdk/vmdk_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 ")
}
Expand Down

0 comments on commit 25c7a7c

Please sign in to comment.