From ce99f3df35367bfb929b77bcbe9812b410b172f5 Mon Sep 17 00:00:00 2001 From: Christoph Glaubitz Date: Wed, 27 Nov 2019 15:05:26 +0100 Subject: [PATCH] Added full cinder ID to candidateDeviceNodes candidateDeviceNodes now also accept the full volumeID --- pkg/cloudprovider/providers/openstack/openstack_volumes.go | 4 ++++ pkg/csi/cinder/mount/mount.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/pkg/cloudprovider/providers/openstack/openstack_volumes.go b/pkg/cloudprovider/providers/openstack/openstack_volumes.go index 8c82e87318..f33b8944dc 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_volumes.go +++ b/pkg/cloudprovider/providers/openstack/openstack_volumes.go @@ -435,8 +435,12 @@ func (os *OpenStack) GetDevicePathBySerialID(volumeID string) string { candidateDeviceNodes := []string{ // KVM fmt.Sprintf("virtio-%s", volumeID[:20]), + // KVM #852 + fmt.Sprintf("virtio-%s", volumeID), // KVM virtio-scsi fmt.Sprintf("scsi-0QEMU_QEMU_HARDDISK_%s", volumeID[:20]), + // KVM virtio-scsi #852 + fmt.Sprintf("scsi-0QEMU_QEMU_HARDDISK_%s", volumeID), // ESXi fmt.Sprintf("wwn-0x%s", strings.Replace(volumeID, "-", "", -1)), } diff --git a/pkg/csi/cinder/mount/mount.go b/pkg/csi/cinder/mount/mount.go index 16a2898d52..df387eaa5e 100644 --- a/pkg/csi/cinder/mount/mount.go +++ b/pkg/csi/cinder/mount/mount.go @@ -141,8 +141,12 @@ func (m *Mount) getDevicePathBySerialID(volumeID string) string { candidateDeviceNodes := []string{ // KVM fmt.Sprintf("virtio-%s", volumeID[:20]), + // KVM #852 + fmt.Sprintf("virtio-%s", volumeID), // KVM virtio-scsi fmt.Sprintf("scsi-0QEMU_QEMU_HARDDISK_%s", volumeID[:20]), + // KVM virtio-scsi #852 + fmt.Sprintf("scsi-0QEMU_QEMU_HARDDISK_%s", volumeID), // ESXi fmt.Sprintf("wwn-0x%s", strings.Replace(volumeID, "-", "", -1)), }