Merge pull request #41498 from mikebryant/cinder-virtio-scsi

Automatic merge from submit-queue

cinder: Add support for the KVM virtio-scsi driver

**What this PR does / why we need it**:

The VirtIO SCSI driver for KVM changes the way disks appear in /dev/disk/by-id.
This adds support for the new format.
Without this, volume attaching on an openstack cluster using this kvm driver doesn't work

**Special notes for your reviewer**:
Does this need e2e tests? I couldn't find anywhere to add another openstack configuration used in the e2e tests.

Wiki page about this: https://wiki.openstack.org/wiki/Virtio-scsi-for-bdm

**Release note**:

```release-note
cinder: Add support for the KVM virtio-scsi driver
```
pull/6/head
Kubernetes Submit Queue 2017-04-21 01:55:23 -07:00 committed by GitHub
commit cdc0cbdac4
1 changed files with 2 additions and 0 deletions

View File

@ -316,6 +316,8 @@ func (os *OpenStack) GetDevicePath(diskId string) string {
candidateDeviceNodes := []string{
// KVM
fmt.Sprintf("virtio-%s", diskId[:20]),
// KVM virtio-scsi
fmt.Sprintf("scsi-0QEMU_QEMU_HARDDISK_%s", diskId[:20]),
// ESXi
fmt.Sprintf("wwn-0x%s", strings.Replace(diskId, "-", "", -1)),
}