diff --git a/vmdk_plugin/plugin.go b/vmdk_plugin/plugin.go index 585c0c59e..b9b2ae564 100644 --- a/vmdk_plugin/plugin.go +++ b/vmdk_plugin/plugin.go @@ -84,14 +84,18 @@ func getMountPoint(volName string) string { // Get info about a single volume func (d *vmdkDriver) Get(r volume.Request) volume.Response { + log.Debug("calling GET ") status, err := d.ops.Get(r.Name) + log.Debug("returned GET ") if err != nil { return volume.Response{Err: err.Error()} } mountpoint := getMountPoint(r.Name) - return volume.Response{Volume: &volume.Volume{Name: r.Name, + response := volume.Response{Volume: &volume.Volume{Name: r.Name, Mountpoint: mountpoint, Status: status}} + log.Debug("got response", response) + return response } // List volumes known to the driver @@ -361,6 +365,11 @@ func (d *vmdkDriver) Mount(r volume.MountRequest) volume.Response { isReadOnly = true } + _, exists := status["fstype"] + + if !exists { + return volume.Response{Err: "Invalid filesystem type."} + } mountpoint, err := d.mountVolume(r.Name, status["fstype"].(string), isReadOnly) if err != nil { log.WithFields(