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
..
2017-12-23 13:12:11 -08:00
2018-01-04 06:40:34 -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
2017-12-23 13:12:11 -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
2017-12-23 13:12:11 -08:00
2018-01-03 16:02:31 +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
2017-12-23 13:12:11 -08:00
2017-12-23 13:12:11 -08:00
2018-01-02 10:57:57 -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
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-03 13:46:32 -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
2017-12-02 05:54:54 -05:00
2018-01-03 08:30:30 -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
2016-07-16 13:48:21 -04:00
2016-06-29 17:47:36 -07:00
2017-07-21 12:14:42 +02:00
2017-03-02 15:01:59 -08:00
2016-09-15 10:05:30 +10:00
2016-06-29 17:47:36 -07:00
2016-09-15 10:05:30 +10:00
2017-03-02 15:01:59 -08:00
2017-03-02 15:01:59 -08:00
2017-10-26 13:26:33 -07:00
2017-09-18 20:09:07 +08:00
2017-12-02 05:54:54 -05:00
2017-12-22 14:36:16 -08:00
2017-12-20 16:47:34 -08:00
2017-08-26 09:58:51 -04:00
2017-08-26 09:58:51 -04:00
2017-11-20 14:10:26 -05:00