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

Avoid wrong filling of glusterfs Volume Spec at ConstructVolumeSpec() #55796

Merged
merged 1 commit into from Nov 21, 2017
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
15 changes: 5 additions & 10 deletions pkg/volume/glusterfs/glusterfs.go
Expand Up @@ -197,16 +197,11 @@ func (plugin *glusterfsPlugin) newUnmounterInternal(volName string, podUID types
}

func (plugin *glusterfsPlugin) ConstructVolumeSpec(volumeName, mountPath string) (*volume.Spec, error) {
glusterfsVolume := &v1.Volume{
Name: volumeName,
VolumeSource: v1.VolumeSource{
Glusterfs: &v1.GlusterfsVolumeSource{
EndpointsName: volumeName,
Path: volumeName,
},
},
}
return volume.NewSpecFromVolume(glusterfsVolume), nil

// To reconstrcut 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")
}

// Glusterfs volumes represent a bare host file or directory mount of an Glusterfs export.
Expand Down