Error attaching NetApp iSCSI volume to Hyper-V compute node

Bug #1368637 reported by Luis Fernández Álvarez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Low
Unassigned

Bug Description

If you try to attach a NetApp iSCSI volume to a Hyper-V compute host, the request is not performed due to a type missmatch in the following line:

https://github.com/openstack/nova/blob/b6a5ce00a0f767da2538b70d5e6d4c998a8e15e0/nova/virt/hyperv/basevolumeutils.py#L135

"if device.ScsiLun == target_lun:"

'device.ScsiLun' returned by WMI is an 'integer', while 'target_lun' reported by the Cinder NetApp iSCSI driver is an 'unicode' string.

I'm not sure if this should be also reported to Cinder. Is there any specification on the Cinder side that specifies the expected data type for that field?

Sean Dague (sdague)
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Lucian Petrut (petrutlucian94) wrote :

The IBM Storwize driver had the same issue and they ended up submitting this patch, performing a cast on the LUN: https://github.com/openstack/cinder/commit/861e93a671f4ca4a7d8b08b05055bab9b9e141f8

The base volume driver does a few conversions to int on the LUN. Also, the docstring examples have the LUNs appearing to be integers so IMO, this should be changed in the NetApp driver as well in order to have consistency.

Sure, another way to do it would be to simply modify the Hyper-v driver to be agnostic about that LUN variable type, but I’d rather go on fixing this on Cinder.

Revision history for this message
Luis Fernández Álvarez (luis-fernandez-alvarez) wrote :
Revision history for this message
Luis Fernández Álvarez (luis-fernandez-alvarez) wrote :

I think we can close this bug, the one reported in Cinder is now fixed and solves this issue:

https://bugs.launchpad.net/cinder/+bug/1372808
https://review.openstack.org/141834

Changed in nova:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.