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 fcpath #95451

Merged
merged 1 commit into from Oct 15, 2020
Merged

Fix fcpath #95451

merged 1 commit into from Oct 15, 2020

Conversation

mkumatag
Copy link
Member

@mkumatag mkumatag commented Oct 9, 2020

What type of PR is this?

/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #95450

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Oct 9, 2020
@k8s-ci-robot k8s-ci-robot added sig/storage Categorizes an issue or PR as relevant to SIG Storage. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 9, 2020
@mkumatag
Copy link
Member Author

mkumatag commented Oct 9, 2020

/retest

@mkumatag
Copy link
Member Author

mkumatag commented Oct 9, 2020

/assign @saad-ali @rootfs

@mkumatag
Copy link
Member Author

/retest

Copy link
Member

@saad-ali saad-ali left a comment

Choose a reason for hiding this comment

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

I am not a FC expert, but the change looks reasonable to me.
/approve
/hold

@rootfs can you PTAL

pkg/volume/fc/fc_util.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 12, 2020
@saad-ali saad-ali added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Oct 12, 2020
@k8s-ci-robot k8s-ci-robot removed the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Oct 12, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mkumatag, saad-ali

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 Oct 12, 2020
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 12, 2020
Copy link
Member

@saad-ali saad-ali left a comment

Choose a reason for hiding this comment

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

/lgtm

Want to give @rootfs a chance to look at this as well. Will let him remove hold.
If he is not able to take a look, feel free to ping me again.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 12, 2020
@saad-ali
Copy link
Member

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 12, 2020
@rootfs
Copy link
Contributor

rootfs commented Oct 14, 2020

I don't have a FC setup to verify, but this could be due to a difference in udev rules. @mkimuram @mtanino can you check?

@rootfs
Copy link
Contributor

rootfs commented Oct 14, 2020

this appears to be caused by different udev rules. I see RHEL and SuSE have different name conventions. So it is possible the paths could have different prefix.

pkg/volume/fc/fc_util.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 14, 2020
@rootfs
Copy link
Contributor

rootfs commented Oct 14, 2020

looks good, @mkimuram @mtanino any comment?

@mkumatag
Copy link
Member Author

/retest

@mkimuram
Copy link
Contributor

The name depends on udev rules, so it makes sense to add expressions that match to other naming conventions.
(I haven't tested with the actual environment, but as https://github.com/hreinecke/sg3_utils/blob/master/scripts/59-fc-wwpn-id.rules shows, distributions that uses sg3_utils seems to name with the convention in this PR.)

So, the overall change looks good to me.

I would like to confirm two things:

  1. Should we care the name that contains "-fc-0x" but doesn't start with "pci-"?
    It was allowed by the original code, but will be denied by the new code.
    I'm not sure that there are such naming conventions used in a real environment, but would like to confirm that it is OK, just for sure.

  2. Should we need to care a distribution that has both "pci-xxx-fc-0xYYYY" and " fc-0xYYYY"?
    In such a distribution, the path found first in the loop will be used.
    I believe that this won't make any issue for the device name is resolved from the symlink and the symlink should point to the same device, but I would like to make sure that it won't be an issue.

@mkimuram
Copy link
Contributor

@rootfs

  1. Should we care the name that contains "-fc-0x" but doesn't start with "pci-"?

I read through the discussion again and your comment "Unless there are other naming conventions, we only have /dev/disk/by-path/fc-0x and /dev/disk/by-path/pci-xxxx-fc-0x. The regex should just filter these cases." seems to say that we don't need to care about this case. I'm OK with it, if it is practically good.

Then, could you just double check "2. Should we need to care a distribution that has both "pci-xxx-fc-0xYYYY" and " fc-0xYYYY"?"?

@rootfs
Copy link
Contributor

rootfs commented Oct 14, 2020

thanks @mkimuram
for the 2nd case when both paths exist (which should be considered poor configuration), then the first match is returned.

@rootfs
Copy link
Contributor

rootfs commented Oct 15, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 15, 2020
@rootfs
Copy link
Contributor

rootfs commented Oct 15, 2020

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 15, 2020
@k8s-ci-robot k8s-ci-robot merged commit d970c18 into kubernetes:master Oct 15, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Oct 15, 2020
@mkumatag mkumatag deleted the fix_fc branch October 15, 2020 14:32
@mkumatag
Copy link
Member Author

Thanks @mkimuram @rootfs @saad-ali

k8s-ci-robot added a commit that referenced this pull request Oct 17, 2020
…51-upstream-release-1.19

Automated cherry pick of #95451: Fix fcpath
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. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. 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/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

failed to find the FC disks starts with fc prefix
5 participants