Kubernetes Submit Queue
d8680a3c43
Merge pull request #57549 from andyzhangx/azurediskid-fix
Automatic merge from submit-queue (batch tested with PRs 56382, 57549). 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 azure disk not available issue when device name changed
**What this PR does / why we need it**:
There is possibility that device name(`/dev/sd*`) would change when attach/detach data disk in Azure VM according to [Troubleshoot Linux VM device name change](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/troubleshoot-device-names-problems).
And We did hit this issue, see customer [case](https://github.com/Azure/acs-engine/issues/1918).
This PR would use `/dev/disk/by-id` instead of `/dev/sd*` for azure disk and `/dev/disk/by-id` would not change even device name changed.
**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 #57444
**Special notes for your reviewer**:
In a customer [case](https://github.com/Azure/acs-engine/issues/1918), customer is unable to use azure disk in StatefulSet since /dev/sd* changed after detach/attach disk.
we are using `/dev/sd*`(code is [here](https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/azure_dd/azure_common_linux.go#L140)) to "mount -bind" k8s path, while `/dev/sd*` could be changed when VM is attach/detaching data disks, see [Troubleshoot Linux VM device name change](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/troubleshoot-device-names-problems)
And I have also checked related AWS, GCE code, they are using `/dev/disk/by-id/` other than `/dev/sd*`, see [aws code](https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/aws_ebs/aws_util.go#L228)
[gce code](https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/gce_pd/gce_util.go#L278)
**Release note**:
```
fix azure disk not available when device name changed
```
/sig azure
/assign @rootfs
@karataliu @brendandburns @khenidak
2018-01-04 06:40:34 -08:00
..
2018-01-03 09:22:22 -08:00
2018-01-02 22:13:19 -08:00
2017-12-23 13:12:11 -08:00
2017-12-23 13:12:11 -08:00
2017-12-23 13:12:11 -08:00
2018-01-02 22:13:19 -08:00
2018-01-04 03:22:36 -08:00
2018-01-02 13:15:42 -08:00
2018-01-03 10:23:26 +08:00
2017-12-19 13:38:56 -08:00
2017-12-23 13:12:11 -08:00
2017-11-22 18:40:09 +00:00
2017-12-23 13:12:11 -08:00
2018-01-03 09:39:33 +08:00
2018-01-03 18:56:44 -08:00
2017-11-15 17:47:10 -08:00
2017-12-23 13:13:09 -08:00
2018-01-03 09:22:22 -08:00
2017-12-23 13:12:11 -08:00
2018-01-03 17:47:05 -08:00
2018-01-02 13:15:47 -08:00
2018-01-02 00:21:07 -08:00
2017-11-28 17:53:02 +01:00
2017-12-23 13:12:11 -08:00
2017-12-23 13:12:11 -08:00
2017-12-15 09:27:52 +08:00
2017-12-23 13:12:11 -08:00
2018-01-02 14:09:40 -08:00
2017-11-09 16:36:27 -08:00
2018-01-04 06:40:34 -08:00
2017-10-15 18:18:13 -07:00
2017-10-13 07:06:22 -04:00
2017-12-15 22:47:23 -08:00