mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
Merge pull request #35669 from humblec/glusterfs-instead-gluster
Automatic merge from submit-queue Make a consistent name ( GlusterFS instead of Gluster) in variables a… Signed-off-by: Humble Chirammal hchiramm@redhat.com
This commit is contained in:
commit
d87dfa2723
@ -57,7 +57,7 @@ var _ volume.Deleter = &glusterfsVolumeDeleter{}
|
|||||||
const (
|
const (
|
||||||
glusterfsPluginName = "kubernetes.io/glusterfs"
|
glusterfsPluginName = "kubernetes.io/glusterfs"
|
||||||
volPrefix = "vol_"
|
volPrefix = "vol_"
|
||||||
dynamicEpSvcPrefix = "gluster-dynamic-"
|
dynamicEpSvcPrefix = "glusterfs-dynamic-"
|
||||||
replicaCount = 3
|
replicaCount = 3
|
||||||
durabilityType = "replicate"
|
durabilityType = "replicate"
|
||||||
secretKeyName = "key" // key name used in secret
|
secretKeyName = "key" // key name used in secret
|
||||||
@ -325,7 +325,7 @@ func (b *glusterfsMounter) setUpAtInternal(dir string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Failed mount scenario.
|
// 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
|
// it all goes in a log file, we will read the log file
|
||||||
logerror := readGlusterLog(log, b.pod.Name)
|
logerror := readGlusterLog(log, b.pod.Name)
|
||||||
if logerror != nil {
|
if logerror != nil {
|
||||||
@ -344,7 +344,7 @@ func getVolumeSource(
|
|||||||
return spec.PersistentVolume.Spec.Glusterfs, spec.ReadOnly, nil
|
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) {
|
func (plugin *glusterfsPlugin) NewProvisioner(options volume.VolumeOptions) (volume.Provisioner, error) {
|
||||||
@ -428,8 +428,8 @@ func (d *glusterfsVolumeDeleter) Delete() error {
|
|||||||
|
|
||||||
cli := gcli.NewClient(d.url, d.user, d.secretValue)
|
cli := gcli.NewClient(d.url, d.user, d.secretValue)
|
||||||
if cli == nil {
|
if cli == nil {
|
||||||
glog.Errorf("glusterfs: failed to create gluster rest client")
|
glog.Errorf("glusterfs: failed to create glusterfs rest client")
|
||||||
return fmt.Errorf("glusterfs: failed to create gluster rest client, REST server authentication failed")
|
return fmt.Errorf("glusterfs: failed to create glusterfs rest client, REST server authentication failed")
|
||||||
}
|
}
|
||||||
err = cli.VolumeDelete(volumeId)
|
err = cli.VolumeDelete(volumeId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -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)
|
glog.V(2).Infof("glusterfs: create volume of size: %d bytes and configuration %+v", volSizeBytes, p.provisioningConfig)
|
||||||
if p.url == "" {
|
if p.url == "" {
|
||||||
glog.Errorf("glusterfs : rest server endpoint is empty")
|
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)
|
cli := gcli.NewClient(p.url, p.user, p.secretValue)
|
||||||
if cli == nil {
|
if cli == nil {
|
||||||
glog.Errorf("glusterfs: failed to create gluster rest client")
|
glog.Errorf("glusterfs: failed to create glusterfs rest client")
|
||||||
return nil, 0, fmt.Errorf("failed to create gluster REST client, REST server authentication failed")
|
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}}}
|
volumeReq := &gapi.VolumeCreateRequest{Size: sz, Durability: gapi.VolumeDurabilityInfo{Type: durabilityType, Replicate: gapi.ReplicaDurability{Replica: replicaCount}}}
|
||||||
volume, err := cli.VolumeCreate(volumeReq)
|
volume, err := cli.VolumeCreate(volumeReq)
|
||||||
|
Loading…
Reference in New Issue
Block a user