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

Fix reconstruction of FC volumes #74023

Merged
merged 1 commit into from
Feb 19, 2019

Conversation

jsafrane
Copy link
Member

Currently, Fibre Channel volume stores only the first WWN / WWID in global mount directory name. This is not enough to reconstruct a volume after kubelet restart.

This PR stores all WWNs / WWIDs in the global path name and parses it from there.

/kind bug
/sig storage

Does this PR introduce a user-facing change?:

NONE

/assign @rootfs @gnufied @tsmetana

It should reconstruct all WWNs or WWIDs instead of just the first one.
On-disk directory name format had to be changed to contain all WWNs/WWIDs.
@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label Feb 13, 2019
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. sig/storage Categorizes an issue or PR as relevant to SIG Storage. labels Feb 13, 2019
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 13, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jsafrane

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 13, 2019
@jsafrane
Copy link
Member Author

cc: @mtanino, PTAL.

@@ -131,20 +132,47 @@ func scsiHostRescan(io ioHandler) {
}
}

// make a directory like /var/lib/kubelet/plugins/kubernetes.io/fc/target-lun-0
// make a directory like /var/lib/kubelet/plugins/kubernetes.io/fc/target1-target2-lun-0
func makePDNameInternal(host volume.VolumeHost, wwns []string, lun string, wwids []string) string {
Copy link
Member

Choose a reason for hiding this comment

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

How will this work for existing FC mounts? I assume this only fixes new mounts right? Existing mounts that did not store all information will still be broken?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, only the first WWN / WWID will be restored from mounts created by old kubelet. That's equal to behaviour before this PR, i.e. it won't re-introduce any regression (tested on my FC machine).

@jsafrane
Copy link
Member Author

/retest

@gnufied
Copy link
Member

gnufied commented Feb 19, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 19, 2019
@k8s-ci-robot k8s-ci-robot merged commit 64f2630 into kubernetes:master Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants