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
[FC Plugin] Create proper volumeSpec during ConstructVolumeSpec #58089
Conversation
// Create volume from wwn+lun or wwid | ||
var fcVolume *v1.Volume | ||
if strings.Contains(volumeInfo, "-lun-") { | ||
wwnLun := strings.Split(volumeInfo, "-lun-") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validate wwnLun
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
@@ -235,11 +235,56 @@ func (plugin *fcPlugin) newUnmapperInternal(volName string, podUID types.UID, ma | |||
} | |||
|
|||
func (plugin *fcPlugin) ConstructVolumeSpec(volumeName, mountPath string) (*volume.Spec, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a unit test too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rootfs
Do you have an idea to mock up mount.GetMountRefs(mounter, mountPath)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
Currently, FC plugin returns volume name and empty FCVolumeSource during ConstrutVolumeSpec during filesystem volume's reconstruction. In this fix, ConstructVolumeSpec retrieves global mount path, analyzes volume parameters such as WWN, LUN, WWID from the path. Fixes kubernetes#58085
/approve |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mtanino, rootfs Associated issue: #58085 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
Currently, FC plugin returns volume name and empty FCVolumeSource during ConstrutVolumeSpec of filesystem volume's reconstruction.
In this fix, ConstructVolumeSpec retrieves global mount path, and analyzes volume parameters such as
WWN, LUN, WWID from the path.
Which issue(s) this PR fixes :
Fixes #58085
Special notes for your reviewer:
Release note:
cc @rootfs @jsafrane
/sig storage