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

Commit

Permalink
fix bug: gluster file params does not take effect
Browse files Browse the repository at this point in the history
  • Loading branch information
lowang-bh committed Jun 23, 2020
1 parent 5c38d73 commit 0c2e8e9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 0c2e8e9

Please sign in to comment.