Fix space in volumePath in vSphere

pull/6/head
Balu Dontu 2016-12-07 16:15:51 -08:00
parent ce93c81029
commit 4d57ad6fca
1 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,7 @@ import (
"fmt" "fmt"
"os" "os"
"path" "path"
"strings"
"github.com/golang/glog" "github.com/golang/glog"
"k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/resource"
@ -125,6 +126,7 @@ func (plugin *vsphereVolumePlugin) ConstructVolumeSpec(volumeName, mountPath str
if err != nil { if err != nil {
return nil, err return nil, err
} }
volumePath = strings.Replace(volumePath, "\\040", " ", -1)
glog.V(5).Infof("vSphere volume path is %q", volumePath) glog.V(5).Infof("vSphere volume path is %q", volumePath)
vsphereVolume := &v1.Volume{ vsphereVolume := &v1.Volume{
Name: volumeName, Name: volumeName,