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

Use correct pv annotation to fetch volume ID. #58626

Merged
merged 1 commit into from Jan 25, 2018
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
4 changes: 2 additions & 2 deletions pkg/volume/glusterfs/glusterfs.go
Expand Up @@ -1085,8 +1085,8 @@ func getVolumeID(pv *v1.PersistentVolume, volumeName string) (string, error) {

// Get volID from pvspec if available, else fill it from volumename.
if pv != nil {
if pv.Annotations["VolID"] != "" {
volumeID = pv.Annotations["VolID"]
if pv.Annotations[heketiVolIDAnn] != "" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I would assume this never worked or was the annotation changed some point in time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gnufied annotation changed just before the last patch which I corrected now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you link the patch where annotation was changed? I am wondering about backward compatibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#56315 this patch brought that annotation, till then I was using volid as the annotation. Reg#backward compatibility I have tested and verified it works. @gnufied thanks!

volumeID = pv.Annotations[heketiVolIDAnn]
} else {
volumeID = dstrings.TrimPrefix(volumeName, volPrefix)
}
Expand Down