FC attach fails for single WWN

Bug #1214413 reported by Avishay Traeger on 2013-08-20
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Critical
Avishay Traeger
OpenStack Compute (nova)
Undecided
Avishay Traeger

Bug Description

When attaching a volume with FC, there are two options in the code for WWNs - list or string:

if isinstance(ports, list):
    for wwn in ports:
        wwns.append(wwn)
    elif isinstance(ports, str):
        wwns.append(ports)

Unfortunately when we have a single WWN, it's of type unicode and not string, and therefore 'wwns' is an empty list. This causes the attach to fail.

Changed in nova:
status: New → Confirmed
assignee: nobody → Avishay Traeger (avishay-il)

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

Changed in nova:
status: Confirmed → In Progress

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

Changed in cinder:
status: Confirmed → In Progress
Thierry Carrez (ttx) on 2013-08-20
Changed in cinder:
milestone: none → havana-3

Reviewed: https://review.openstack.org/42935
Committed: http://github.com/openstack/cinder/commit/8bd26071418c26ccaa40423b75750fa3bab1fa22
Submitter: Jenkins
Branch: master

commit 8bd26071418c26ccaa40423b75750fa3bab1fa22
Author: Avishay Traeger <email address hidden>
Date: Tue Aug 20 18:53:47 2013 +0300

    Fix Fibre Channel attach for single WWN

    The code allowed for only a string of the WWN or a list of them.
    Unfortunately unicode is also returned, for which the attach fails.
    This patch allows for unicode as well.

    Change-Id: I4d2809b41b24b2240e447a5c09f14e6438304cd6
    Fixes: bug 1214413

Changed in cinder:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/42914
Committed: http://github.com/openstack/nova/commit/52c0668548eb4a7e3536c241c9551cdf89f2d696
Submitter: Jenkins
Branch: master

commit 52c0668548eb4a7e3536c241c9551cdf89f2d696
Author: Avishay Traeger <email address hidden>
Date: Tue Aug 20 17:44:46 2013 +0300

    Fix Fibre Channel attach for single WWN

    The code allowed for only a string of the WWN or a list of them.
    Unfortunately unicode is also returned, for which the attach fails.
    This patch allows for unicode as well.

    Change-Id: I1d81abc3f8569ce8b3fb25c0e9c8aefd10e9aae8
    Fixes: bug 1214413

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-09-05
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-09-05
Changed in nova:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-3 → 2013.2
Thierry Carrez (ttx) on 2013-10-17
Changed in nova:
milestone: havana-3 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers