mirror of https://github.com/k3s-io/k3s
Fix glusterfs creating volumes in GiB
As per glusterfs documentation it can't create volumes in GiB and all sizes must be specified in GB. This code was slightly buggy because we were creating volumes of sizes lesser than user asked forpull/6/head
parent
7e8b4a2d60
commit
77be9123f7
|
@ -737,7 +737,8 @@ func (p *glusterfsVolumeProvisioner) CreateVolume(gid int) (r *v1.GlusterfsVolum
|
|||
var clusterIDs []string
|
||||
capacity := p.options.PVC.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)]
|
||||
volSizeBytes := capacity.Value()
|
||||
sz := int(volume.RoundUpSize(volSizeBytes, 1024*1024*1024))
|
||||
// Glusterfs creates volumes in units of GBs
|
||||
sz := int(volume.RoundUpSize(volSizeBytes, 1000*1000*1000))
|
||||
glog.V(2).Infof("create volume of size: %d bytes and configuration %+v", volSizeBytes, p.provisionerConfig)
|
||||
if p.url == "" {
|
||||
glog.Errorf("REST server endpoint is empty")
|
||||
|
|
Loading…
Reference in New Issue