From 0c2e8e914923aa0ce6e1f9626aa0b9232b85da51 Mon Sep 17 00:00:00 2001 From: lhuiwang Date: Tue, 16 Jun 2020 23:04:57 +0800 Subject: [PATCH] fix bug: gluster file params does not take effect --- .../cmd/glusterfile-provisioner/glusterfile-provisioner.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gluster/file/cmd/glusterfile-provisioner/glusterfile-provisioner.go b/gluster/file/cmd/glusterfile-provisioner/glusterfile-provisioner.go index 11466784fda..77c129db1bd 100644 --- a/gluster/file/cmd/glusterfile-provisioner/glusterfile-provisioner.go +++ b/gluster/file/cmd/glusterfile-provisioner/glusterfile-provisioner.go @@ -304,7 +304,7 @@ func (p *glusterfileProvisioner) createVolumeClone(sourceVolID string, config *p volSource, volErr := p.createVolumeSource(cli, cloneVolInfo) if volErr != nil { - return nil, 0, "", fmt.Errorf("error [%v] when creating volume source for volume %s", err, cloneVolInfo.Name) + return nil, 0, "", fmt.Errorf("error [%v] when creating volume source for volume %s", volErr, cloneVolInfo.Name) } if volSource == nil { @@ -389,7 +389,7 @@ func (p *glusterfileProvisioner) CreateVolume(gid *int, config *provisionerConfi config.thinPoolSnapFactor, } - volumeReq := &gapi.VolumeCreateRequest{Size: sz, Name: customVolumeName, Clusters: clusterIDs, Gid: gid64, Durability: p.volumeType, GlusterVolumeOptions: p.volumeOptions, Snapshot: snaps} + volumeReq := &gapi.VolumeCreateRequest{Size: sz, Name: customVolumeName, Clusters: clusterIDs, Gid: gid64, Durability: config.volumeType, GlusterVolumeOptions: config.volumeOptions, Snapshot: snaps} volume, err := cli.VolumeCreate(volumeReq) if err != nil { @@ -402,7 +402,7 @@ func (p *glusterfileProvisioner) CreateVolume(gid *int, config *provisionerConfi volSource, volErr := p.createVolumeSource(cli, volume) if volErr != nil { - return nil, 0, "", fmt.Errorf("error [%v] when creating volume source for volume %s", err, volume.Name) + return nil, 0, "", fmt.Errorf("error [%v] when creating volume source for volume %s", volErr, volume.Name) } if volSource == nil {