Production-Grade Container Scheduling and Management
Go to file
Kubernetes Submit Queue bf3cda66c3
Merge pull request #62612 from andyzhangx/azure-devicepath-fix
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:
568afb4ecc/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
2018-04-16 21:56:10 -07:00
.github
api Run hack/update-all.sh 2018-04-13 10:19:58 -07:00
build Move all create subcommands to its own subdirectory 2018-04-12 23:47:31 +02:00
cluster Merge pull request #62676 from MrHohn/kube-dns-1.14.10 2018-04-16 21:56:07 -07:00
cmd Merge pull request #57224 from xiangpengzhao/kubeadm-phase-kubelet 2018-04-16 18:02:11 -07:00
docs Merge pull request #57224 from xiangpengzhao/kubeadm-phase-kubelet 2018-04-16 18:02:11 -07:00
examples Merge pull request #58349 from humblec/patch-2 2018-03-20 18:34:35 -07:00
Godeps update godeps to use latest pflag 2018-04-13 17:08:48 -07:00
hack Merge pull request #56040 from vikaschoudhary16/ckmngr 2018-04-16 15:02:08 -07:00
logo
pkg Merge pull request #62612 from andyzhangx/azure-devicepath-fix 2018-04-16 21:56:10 -07:00
plugin Merge pull request #58784 from wackxu/reminit 2018-04-16 12:58:11 -07:00
staging Merge pull request #62505 from mtaufen/show-deprecated-help 2018-04-14 12:21:01 -07:00
test Merge pull request #62670 from Random-Liu/fix-kubelet-flags 2018-04-16 16:59:09 -07:00
third_party Fix spurious whitespace in messages from sh2ju. 2018-03-28 20:11:58 -07:00
translations Merge pull request #61817 from xuhuilong/master 2018-04-11 10:41:24 -07:00
vendor update godeps to use latest pflag 2018-04-13 17:08:48 -07:00
.bazelrc
.generated_files
.gitattributes
.gitignore fix all the typos across the project 2018-02-11 11:04:14 +08:00
.kazelcfg.json
BUILD.bazel
CHANGELOG-1.2.md
CHANGELOG-1.3.md
CHANGELOG-1.4.md
CHANGELOG-1.5.md
CHANGELOG-1.6.md
CHANGELOG-1.7.md Update CHANGELOG-1.7.md for v1.7.16. 2018-04-04 13:07:30 +00:00
CHANGELOG-1.8.md Update CHANGELOG-1.8.md for v1.8.11. 2018-04-05 13:15:26 -07:00
CHANGELOG-1.9.md Merge pull request #53979 from ZouRui89/master 2018-04-09 14:49:51 -07:00
CHANGELOG-1.10.md Update CHANGELOG-1.10.md for v1.10.1. 2018-04-12 17:51:25 +00:00
CHANGELOG.md Marks 1.10 as the current release 2018-03-26 17:08:54 -07:00
code-of-conduct.md
CONTRIBUTING.md
labels.yaml
LICENSE
Makefile
Makefile.generated_files
OWNERS root OWNERS: escape backslashes 2018-04-13 10:42:22 -07:00
OWNERS_ALIASES Merge pull request #62281 from juanvallejo/jvallejo/sig-cli-reviewers 2018-04-09 16:00:11 -07:00
README.md Update README.md 2018-02-11 04:34:01 +00:00
SUPPORT.md
WORKSPACE

Kubernetes

Submit Queue Widget GoDoc Widget CII Best Practices


Kubernetes is an open source system for managing containerized applications across multiple hosts; providing basic mechanisms for deployment, maintenance, and scaling of applications.

Kubernetes builds upon a decade and a half of experience at Google running production workloads at scale using a system called Borg, combined with best-of-breed ideas and practices from the community.

Kubernetes is hosted by the Cloud Native Computing Foundation (CNCF). If you are a company that wants to help shape the evolution of technologies that are container-packaged, dynamically-scheduled and microservices-oriented, consider joining the CNCF. For details about who's involved and how Kubernetes plays a role, read the CNCF announcement.


To start using Kubernetes

See our documentation on kubernetes.io.

Try our interactive tutorial.

Take a free course on Scalable Microservices with Kubernetes.

To start developing Kubernetes

The community repository hosts all information about building Kubernetes from source, how to contribute code and documentation, who to contact about what, etc.

If you want to build Kubernetes right away there are two options:

You have a working Go environment.
$ go get -d k8s.io/kubernetes
$ cd $GOPATH/src/k8s.io/kubernetes
$ make
You have a working Docker environment.
$ git clone https://github.com/kubernetes/kubernetes
$ cd kubernetes
$ make quick-release

For the full story, head over to the developer's documentation.

Support

If you need support, start with the troubleshooting guide, and work your way through the process that we've outlined.

That said, if you have questions, reach out to us one way or another.

Analytics