Merge pull request #39844 from screeley44/replica_bug

Automatic merge from submit-queue (batch tested with PRs 39807, 37505, 39844, 39525, 39109)

fix bug not using volumetype config in create volume

fixes #39843 

@humblec 

we are building the volumetype config but I don't see where we are using it in the CreateVolume for dyn provisioning, this is why volumetype parameter from the Storage Class was being overlooked because we are hard coding constants like replicaCount which is always 3.

unless I'm missing something?
This commit is contained in:
Kubernetes Submit Queue 2017-01-13 13:40:43 -08:00 committed by GitHub
commit 823d760ab5

View File

@ -710,7 +710,7 @@ func (p *glusterfsVolumeProvisioner) CreateVolume(gid int) (r *v1.GlusterfsVolum
glog.V(4).Infof("glusterfs: provided clusterids: %v", clusterIds)
}
gid64 := int64(gid)
volumeReq := &gapi.VolumeCreateRequest{Size: sz, Clusters: clusterIds, Gid: gid64, Durability: gapi.VolumeDurabilityInfo{Type: durabilityType, Replicate: gapi.ReplicaDurability{Replica: replicaCount}}}
volumeReq := &gapi.VolumeCreateRequest{Size: sz, Clusters: clusterIds, Gid: gid64, Durability: p.volumeType}
volume, err := cli.VolumeCreate(volumeReq)
if err != nil {
glog.Errorf("glusterfs: error creating volume %v ", err)