Hyper-V unable to find iSCSI volumes from NetApp

Bug #1372808 reported by Luis Fernández Álvarez
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Rushil Chugh
Juno
Fix Released
Undecided
Unassigned

Bug Description

The iSCSI NetApp driver has the same issue reported for IBM Storwize V7K: https://bugs.launchpad.net/bugs/1269915

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 NetApp iSCSI driver is an 'unicode' string.

It could be fixed in a similar way as it was done for Storwize: https://github.com/openstack/cinder/commit/861e93a671f4ca4a7d8b08b05055bab9b9e141f8

This bug was originally reported to Nova: https://bugs.launchpad.net/nova/+bug/1368637

Mike Perez (thingee)
tags: added: drivers netapp
Rushil Chugh (rushil)
Changed in cinder:
assignee: nobody → Rushil Chugh (rushil)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/141834

Changed in cinder:
status: New → In Progress
Jay Bryant (jsbryant)
Changed in cinder:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/141834
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=2d0204ff3ca3a7d42fac5722d577e18edd34ea83
Submitter: Jenkins
Branch: master

commit 2d0204ff3ca3a7d42fac5722d577e18edd34ea83
Author: Rushil Chugh <email address hidden>
Date: Tue Nov 18 14:37:17 2014 -0500

    Ensure that lun_id is an int for NetApp Drivers

    Various NetApp drivers were treating the lun_id as a string
    rather than an int. This was causing attempts to mount NetApp
    volumes to Hyper-V nodes to fail as they were checking an integer
    type against a unicode type which would fail.

    This change casts result_lun to an integer after the value has
    gone through the ssh injection attack check. This way Hyper-V
    is able to verify if the found LUN is the target LUN, enabling
    mounting of NetApp volumes to Hyper-V.

    This change also refactors initialize_connection into some helper
    methods so as to enable simpler unit testing of the patchset.

    Closes-bug: 1372808

    Change-Id: I308b3b2dff315ec33451fb45a30ecd53d5d4c353

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/143536

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/143597

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/juno)

Reviewed: https://review.openstack.org/143597
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=ae717b16c1b38ca3ffbbd5f01a7648682f41d54b
Submitter: Jenkins
Branch: stable/juno

commit ae717b16c1b38ca3ffbbd5f01a7648682f41d54b
Author: Rushil Chugh <email address hidden>
Date: Fri Dec 19 01:03:13 2014 -0500

    Ensure that lun_id is an int for NetApp Drivers

    Various NetApp drivers were treating the lun_id as a string
    rather than an int. This was causing attempts to mount NetApp
    volumes to Hyper-V nodes to fail as they were checking an integer
    type against a unicode type which would fail.

    This change casts result_lun to an integer after the value has
    gone through the ssh injection attack check. This way Hyper-V
    is able to verify if the found LUN is the target LUN, enabling
    mounting of NetApp volumes to Hyper-V.

    This change also refactors initialize_connection into some helper
    methods so as to enable simpler unit testing of the patchset.

    Closes-bug: 1372808

    Change-Id: I308b3b2dff315ec33451fb45a30ecd53d5d4c353
    (cherry picked from commit:2d0204ff3ca3a7d42fac5722d577e18edd34ea83)

tags: added: in-stable-juno
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (stable/icehouse)

Change abandoned by Rushil Chugh (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/143536
Reason: Not a critical security defect. Hence, needs to be abandoned.

Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-1 → 2015.1.0
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.