-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
iSCSI plugin: Update devicepath with filepath.Glob result #47281
Conversation
Hi @mtanino. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
pkg/volume/iscsi/iscsi_util.go
Outdated
for i := 0; i < maxRetries; i++ { | ||
var err error | ||
if deviceTransport == "tcp" { | ||
_, err = osStat(devicePath) |
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 devicePath != nil
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.
pkg/volume/iscsi/iscsi_util.go
Outdated
// There might be a case that fpath contains multiple device paths if | ||
// multiple PCI devices connect to same iscsi target. We handle this | ||
// case at subsequent logic. Pick up only first path here. | ||
*devicePath = fpath[0] |
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.
@mtanino @thoro can you get a sample of /dev/disk/by-path/ and add to the comment? Would it be possible to sort the paths and pick the first one? I am concerned if the paths appear at non-deterministic order, there is a chance the devicePath is randomly chosen yet points to the same target, which could be a problem later for logout.
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.
@thoro
Could you paste your result here? I don't have iSER device, so I can't.
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.
I guess this kind of results might be obtained.
- /dev/disk/by-path/pci-DEVICE1-ip-127.0.0.1:3260-iqn.2014-12.com.example:test.tgt00-lun-0
- /dev/disk/by-path/pci-DEVICE2-ip-127.0.0.1:3260-iqn.2014-12.com.example:test.tgt00-lun-0
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.
Path would look like that, the
/dev/disk/by-path/pci-0000:06:00.0-ip-10.0.13.3:3260-iscsi-iqn.2017-01.at.cf-it.at-storage-01-lun-0
which corresponds to the Infiniband Adapter
06:00.0 InfiniBand: QLogic Corp. IBA7322 QDR InfiniBand HCA (rev 01)
@k8s-bot ok to test |
If iscsiTransport is not tcp, iSCSI plugin tries to find devicepath using filepath.Glob but never updates devicepath with the filepath.Glob result. This patch fixes the problem. Fixes kubernetes#47253
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mtanino, rootfs Associated issue: 47253 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 |
@thoro do you need it in 1.6? |
@rootfs Nope, is missing the CHAP Auth anyways ;) - running my own from master |
@thoro Happy bug reporting! |
@eparis |
Automatic merge from submit-queue |
What this PR does / why we need it:
If iscsiTransport is not tcp, iSCSI plugin tries to
find devicepath using filepath.Glob but never updates
devicepath with the filepath.Glob result.
This patch fixes the problem.
Which issue this PR fixes : fixes #47253
Special notes for your reviewer:
Release note: