-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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 WaitForAttach failure issue for azure disk #62612
fix WaitForAttach failure issue for azure disk #62612
Conversation
add WaitForAttach logging
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.
The change lgtm. Let's wait a while for @jingxu97's opinion.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, feiskyer 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 |
Automatic merge from submit-queue (batch tested with PRs 62676, 62612). If you want to cherry-pick this change to another branch, please follow the instructions here. |
Hi @andyzhangx sorry for the delay. According to the comments for WaitforAttach(), the device path is returned. In your case, what is the different between the passing device path and the returned one? I think we should have better comments to explain the difference. // WaitForAttach blocks until the device is attached to this |
I think same logic would happens in aws_ebs.WaitForAttach func, although it uses |
I think EBS will be fine because EBS does not rely on device path to create new device paths in the way Azure is doing. There is a small ambiguity around NVMe disks but I think those should be fine too |
@andyzhangx do you want to backport the fix to 1.10? It appears that - attach operation for AzureDisks might be broken on 1.10? cc @saad-ali |
how would I fixing this if I got pods running and needs to be remounted ? @andyzhangx |
To be clear, this issue has been fixed in k8s v1.10.2, so only v1.10.0 & v1.10.1 would have this issue, and there is no workaround in those two minor versions, only way to upgrade to a higer version. |
What this PR does / why we need it:
From v1.10,
devicePath
will be updated due to following code change:kubernetes/pkg/volume/util/operationexecutor/operation_generator.go
Lines 517 to 518 in 568afb4
So in v1.10.0, MountVolume.WaitForAttach will fail in the azure disk remount, error logs would be like following:
This PR does not use
devicePath
anymore since it could be changed, instead, it usediskController.GetDiskLun(diskName, volumeSource.DataDiskURI, nodeName)
to get disk LUN, this ARM api call would cost about 0.12sThe GCE disk won't have this issue since
devicePath
is not used in WaitForAttach func, while aws disk is also usingdevicePath
in WaitForAttach func, I think there is potentical issue for aws_ebsWhich issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #62540
Special notes for your reviewer:
should cherry-pick to v1.10
Release note:
/assign @feiskyer
/sig azure
FYI @khenidak