-
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
WaitForAttach failed for azure disk: parsing "/dev/disk/azure/scsi1/lun1": invalid syntax #62540
Comments
Update: above fix does not work on Windows, I am still investigating a better solution. kubernetes/pkg/volume/util/operationexecutor/operation_generator.go Lines 517 to 518 in ee4d90a
while
|
@andyzhangx thanks for issuing this problem. Could you submit a PR with your fix so that we can review it? Thanks! |
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 <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. fix WaitForAttach failure issue for azure disk **What this PR does / why we need it**: From v1.10, `devicePath` will be updated due to following code change: https://github.com/kubernetes/kubernetes/blob/568afb4ecca99bc3b54fddc20927b3713369d357/pkg/volume/util/operationexecutor/operation_generator.go#L517-L518 So in v1.10.0, MountVolume.WaitForAttach will fail in the azure disk remount, error logs would be like following: ``` MountVolume.WaitForAttach failed for volume "pvc-f1562ecb-3e5f-11e8-ab6b-000d3af9f967" : azureDisk - Wait for attach expect device path as a lun number, instead got: /dev/disk/azure/scsi1/lun1 (strconv.Atoi: parsing "/dev/disk/azure/scsi1/lun1": invalid syntax) Warning FailedMount 1m (x10 over 21m) kubelet, k8s-agentpool-66825246-0 Unable to mount volumes for pod ``` This PR does not use `devicePath` anymore since it could be changed, instead, it use `diskController.GetDiskLun(diskName, volumeSource.DataDiskURI, nodeName)` to get disk LUN, this ARM api call would cost about 0.12s The GCE disk won't have this issue since `devicePath` is not used in [WaitForAttach func](https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/gce_pd/attacher.go#L133), while aws disk is also using `devicePath` in [WaitForAttach func](https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/aws_ebs/attacher.go#L145), I think there is potentical issue for aws_ebs **Which 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**: ``` fix WaitForAttach failure issue for azure disk ``` /assign @feiskyer /sig azure FYI @khenidak
Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
This was introduced by following code change introduced in v1.10.0:
kubernetes/pkg/volume/util/operationexecutor/operation_generator.go
Lines 517 to 518 in 568afb4
candidate fix is here(only works on Linux, not a good solution):
andyzhangx@e287390
This issue is caused by PR: #58177
Environment:
kubectl version
): v1.10uname -a
):/sig azure
/assign
The text was updated successfully, but these errors were encountered: