-
Notifications
You must be signed in to change notification settings - Fork 807
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 canonical nvme device resolution in more cases #1141
Fix canonical nvme device resolution in more cases #1141
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. |
|
Welcome @PaulFurtado! |
Hi @PaulFurtado. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
/ok-to-test /assign @wongma7 |
thanks, this makes sense to me at a glance. from what i can tell resolving symlinks is exactly what linux means "canonicalizing" a path is before putting entry in mount table https://github.com/util-linux/util-linux/blob/441f9b9303d015f1777aec7168807d58feacca31/libmount/src/cache.c https://github.com/util-linux/util-linux/blob/441f9b9303d015f1777aec7168807d58feacca31/lib/canonicalize.c#L121 so it follows that if we are trying to canonicalize device path to compare it with what's in mount table aws-ebs-csi-driver/pkg/driver/node.go Lines 200 to 203 in 5d78287
|
@@ -48,12 +60,26 @@ func (d *nodeService) findDevicePath(devicePath, volumeID, partition string) (st | |||
} | |||
|
|||
if exists { |
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.
should we still try to fallback to the findNvmeVolume method in case there is an error in this block (if lstat or evalsymlinks somehow fails)? Is there any situation where we receive a devicePath that exists but cannot* be lstatted or evalsymlink'd? If not then it is not necessary to fallback and this PR is good as-is
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.
@wongma7 I cannot think of a situation where that could be possible.
Also worth noting: we have been running with this patch in our clusters internally and it has eliminated all of the EBS attach/detach issues we've had since upgrading kubernetes from 1.19 to 1.21. |
/lgtm thanks |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: PaulFurtado, wongma7 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 |
Is this a bug fix or adding new feature?
Bug fix further improving on #1082
What is this PR about? / Why do we need it?
/dev/xvdXX
symlinks to continue to function, but properly identifies them as nvme devices based on the/dev/nvme
prefix/dev/xvdb
symlinked to/dev/sdb
, even that would work correctly./dev/xvdXX
symlinks will now correctly handle appending the partition string/dev/disk/by-id
fallback continues to work correctlynode_linux.go
: this file was using klog v2 while the rest of the repo was using v1 so its logging was going nowhereWhat testing is done?
/dev/xvdXX
udev rules for nvme devices/dev/disk/by-id
udev rules for nvme devices