Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a consistent name ( GlusterFS instead of Gluster) in variables a… #35669

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions pkg/volume/glusterfs/glusterfs.go
Expand Up @@ -57,7 +57,7 @@ var _ volume.Deleter = &glusterfsVolumeDeleter{}
const (
glusterfsPluginName = "kubernetes.io/glusterfs"
volPrefix = "vol_"
dynamicEpSvcPrefix = "gluster-dynamic-"
dynamicEpSvcPrefix = "glusterfs-dynamic-"
replicaCount = 3
durabilityType = "replicate"
secretKeyName = "key" // key name used in secret
Expand Down Expand Up @@ -325,7 +325,7 @@ func (b *glusterfsMounter) setUpAtInternal(dir string) error {
}

// Failed mount scenario.
// Since gluster does not return error text
// Since glusterfs does not return error text
// it all goes in a log file, we will read the log file
logerror := readGlusterLog(log, b.pod.Name)
if logerror != nil {
Expand All @@ -344,7 +344,7 @@ func getVolumeSource(
return spec.PersistentVolume.Spec.Glusterfs, spec.ReadOnly, nil
}

return nil, false, fmt.Errorf("Spec does not reference a Gluster volume type")
return nil, false, fmt.Errorf("Spec does not reference a GlusterFS volume type")
}

func (plugin *glusterfsPlugin) NewProvisioner(options volume.VolumeOptions) (volume.Provisioner, error) {
Expand Down Expand Up @@ -428,8 +428,8 @@ func (d *glusterfsVolumeDeleter) Delete() error {

cli := gcli.NewClient(d.url, d.user, d.secretValue)
if cli == nil {
glog.Errorf("glusterfs: failed to create gluster rest client")
return fmt.Errorf("glusterfs: failed to create gluster rest client, REST server authentication failed")
glog.Errorf("glusterfs: failed to create glusterfs rest client")
return fmt.Errorf("glusterfs: failed to create glusterfs rest client, REST server authentication failed")
}
err = cli.VolumeDelete(volumeId)
if err != nil {
Expand Down Expand Up @@ -503,12 +503,12 @@ func (p *glusterfsVolumeProvisioner) CreateVolume() (r *api.GlusterfsVolumeSourc
glog.V(2).Infof("glusterfs: create volume of size: %d bytes and configuration %+v", volSizeBytes, p.provisioningConfig)
if p.url == "" {
glog.Errorf("glusterfs : rest server endpoint is empty")
return nil, 0, fmt.Errorf("failed to create gluster REST client, REST URL is empty")
return nil, 0, fmt.Errorf("failed to create glusterfs REST client, REST URL is empty")
}
cli := gcli.NewClient(p.url, p.user, p.secretValue)
if cli == nil {
glog.Errorf("glusterfs: failed to create gluster rest client")
return nil, 0, fmt.Errorf("failed to create gluster REST client, REST server authentication failed")
glog.Errorf("glusterfs: failed to create glusterfs rest client")
return nil, 0, fmt.Errorf("failed to create glusterfs REST client, REST server authentication failed")
}
volumeReq := &gapi.VolumeCreateRequest{Size: sz, Durability: gapi.VolumeDurabilityInfo{Type: durabilityType, Replicate: gapi.ReplicaDurability{Replica: replicaCount}}}
volume, err := cli.VolumeCreate(volumeReq)
Expand Down