From 2ec681632bb9ab254bda821ddbff6e3e48f74680 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 19 Feb 2018 17:37:54 +0100 Subject: [PATCH 1/3] glusterfs: Remove an outdated comment about GB vs GiB This was originally added due to a misunderstanding of the documentation of Heketi (using a different convention). Heketi's documentation has meanwhile been clarified. Signed-off-by: Michael Adam --- pkg/volume/glusterfs/glusterfs.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/volume/glusterfs/glusterfs.go b/pkg/volume/glusterfs/glusterfs.go index d668d40b1a8..1e8599545f4 100644 --- a/pkg/volume/glusterfs/glusterfs.go +++ b/pkg/volume/glusterfs/glusterfs.go @@ -741,7 +741,6 @@ func (p *glusterfsVolumeProvisioner) CreateVolume(gid int) (r *v1.GlusterfsVolum var clusterIDs []string customVolumeName := "" capacity := p.options.PVC.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)] - // Glusterfs creates volumes in units of GiB, but heketi documentation incorrectly reports GBs sz := int(volume.RoundUpToGiB(capacity)) glog.V(2).Infof("create volume of size: %d GiB", sz) if p.url == "" { From 67adc29f8f3d50e351a1a0befd434b61c5b56abc Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 19 Feb 2018 18:53:34 +0100 Subject: [PATCH 2/3] glusterfs: fix a comment typo Signed-off-by: Michael Adam --- pkg/volume/glusterfs/glusterfs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/volume/glusterfs/glusterfs.go b/pkg/volume/glusterfs/glusterfs.go index 1e8599545f4..71102456f88 100644 --- a/pkg/volume/glusterfs/glusterfs.go +++ b/pkg/volume/glusterfs/glusterfs.go @@ -197,7 +197,7 @@ func (plugin *glusterfsPlugin) newUnmounterInternal(volName string, podUID types func (plugin *glusterfsPlugin) ConstructVolumeSpec(volumeName, mountPath string) (*volume.Spec, error) { - // To reconstrcut volume spec we need endpoint where fetching endpoint from mount + // To reconstruct volume spec we need endpoint where fetching endpoint from mount // string looks to be impossible, so returning error. return nil, fmt.Errorf("impossible to reconstruct glusterfs volume spec from volume mountpath") From 6bf35daca77a2df002fe4863088f285f8930f6d8 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 19 Feb 2018 18:53:44 +0100 Subject: [PATCH 3/3] glusterfs: refer to upstream gluster documentation Do not refer to downstream Red Hat documentation in the upstream kubernetes code, if there is upstream documentation to refer to. Signed-off-by: Michael Adam --- pkg/volume/glusterfs/glusterfs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/volume/glusterfs/glusterfs.go b/pkg/volume/glusterfs/glusterfs.go index 71102456f88..15e0ee8dda0 100644 --- a/pkg/volume/glusterfs/glusterfs.go +++ b/pkg/volume/glusterfs/glusterfs.go @@ -332,7 +332,7 @@ func (b *glusterfsMounter) setUpAtInternal(dir string) error { // with `backup-volfile-servers` mount option in place, it is not required to // iterate over all the servers in the addrlist. A mount attempt with this option // will fetch all the servers mentioned in the backup-volfile-servers list. - // Refer backup-volfile-servers @ https://access.redhat.com/documentation/en-US/Red_Hat_Storage/3/html/Administration_Guide/sect-Native_Client.html + // Refer to backup-volfile-servers @ http://docs.gluster.org/en/latest/Administrator%20Guide/Setting%20Up%20Clients/ if (len(addrlist) > 0) && (addrlist[0] != "") { ip := addrlist[0]