Brocade FCZM fails on Python 3

Bug #1888548 reported by Gorka Eguileor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Gorka Eguileor

Bug Description

The Brocade FCZM fails when running on Python 3.
We get "TypeError: 'filter' object is not subscriptable" when we try to attach a volume.

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

Fix proposed to branch: master
Review: https://review.opendev.org/742489

Changed in cinder:
assignee: nobody → Gorka Eguileor (gorka)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/742489
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=9cd71b9de8b3ead48d9ac31a71d2743276b21648
Submitter: Zuul
Branch: master

commit 9cd71b9de8b3ead48d9ac31a71d2743276b21648
Author: Gorka Eguileor <email address hidden>
Date: Wed Jul 22 13:18:00 2020 +0200

    Brocade: Python 3 support

    Builtin method `filter` changed behavior from Python 2, where it
    returned a list, to Python 3, where it returns an interable, and the
    Brocade driver was not ready to handle this behavior which results
    in:

    - Always evaluating to True in `if filtered_members`
    - TypeError: 'filter' object is not subscriptable
    - RuntimeError: dictionary changed size during iteration

    This patch fixes all these to make the driver Python 3 compatible.

    Extensive changes to test_brcd_fc_zone_driver.py were necessary to fix
    the code that was incorrectly setting the configuration options for the
    tests, which resulted in always running with default values.

    Code has been tested on a DevStack deployment running Python 3.7 on
    Fedora 31 with a Brocade 300 running FOS 7.1.0c against 3PAR FC array
    and with `fc_southbound_protocol = HTTP` in the fabric group
    configuration.

    Configuration `fc_southbound_protocol = REST_HTTP` could not be tested
    as its only supported in FOS 8.2.1 and later which available hardware
    doesn't support.

    Closes-Bug: #1888548
    Change-Id: Id9807871f3c183e4195f01aa28c458d7551de9ed

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/746534

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

Reviewed: https://review.opendev.org/746534
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=297c8b078b822622fd3e8c9365f1e03bcd691e53
Submitter: Zuul
Branch: stable/ussuri

commit 297c8b078b822622fd3e8c9365f1e03bcd691e53
Author: Gorka Eguileor <email address hidden>
Date: Wed Jul 22 13:18:00 2020 +0200

    Brocade: Python 3 support

    Builtin method `filter` changed behavior from Python 2, where it
    returned a list, to Python 3, where it returns an interable, and the
    Brocade driver was not ready to handle this behavior which results
    in:

    - Always evaluating to True in `if filtered_members`
    - TypeError: 'filter' object is not subscriptable
    - RuntimeError: dictionary changed size during iteration

    This patch fixes all these to make the driver Python 3 compatible.

    Extensive changes to test_brcd_fc_zone_driver.py were necessary to fix
    the code that was incorrectly setting the configuration options for the
    tests, which resulted in always running with default values.

    Code has been tested on a DevStack deployment running Python 3.7 on
    Fedora 31 with a Brocade 300 running FOS 7.1.0c against 3PAR FC array
    and with `fc_southbound_protocol = HTTP` in the fabric group
    configuration.

    Configuration `fc_southbound_protocol = REST_HTTP` could not be tested
    as its only supported in FOS 8.2.1 and later which available hardware
    doesn't support.

    Closes-Bug: #1888548
    Change-Id: Id9807871f3c183e4195f01aa28c458d7551de9ed
    (cherry picked from commit 9cd71b9de8b3ead48d9ac31a71d2743276b21648)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/747205

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

Reviewed: https://review.opendev.org/747205
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=7a9bc8434dd4b8a5565333c1e71d5f6343b6ae8f
Submitter: Zuul
Branch: stable/train

commit 7a9bc8434dd4b8a5565333c1e71d5f6343b6ae8f
Author: Gorka Eguileor <email address hidden>
Date: Wed Jul 22 13:18:00 2020 +0200

    Brocade: Python 3 support

    Builtin method `filter` changed behavior from Python 2, where it
    returned a list, to Python 3, where it returns an interable, and the
    Brocade driver was not ready to handle this behavior which results
    in:

    - Always evaluating to True in `if filtered_members`
    - TypeError: 'filter' object is not subscriptable
    - RuntimeError: dictionary changed size during iteration

    This patch fixes all these to make the driver Python 3 compatible.

    Extensive changes to test_brcd_fc_zone_driver.py were necessary to fix
    the code that was incorrectly setting the configuration options for the
    tests, which resulted in always running with default values.

    Code has been tested on a DevStack deployment running Python 3.7 on
    Fedora 31 with a Brocade 300 running FOS 7.1.0c against 3PAR FC array
    and with `fc_southbound_protocol = HTTP` in the fabric group
    configuration.

    Configuration `fc_southbound_protocol = REST_HTTP` could not be tested
    as its only supported in FOS 8.2.1 and later which available hardware
    doesn't support.

    Conflicts:
            cinder/tests/unit/zonemanager/test_brcd_fc_zone_driver.py
    The mock import changed over time.

    Closes-Bug: #1888548
    Change-Id: Id9807871f3c183e4195f01aa28c458d7551de9ed
    (cherry picked from commit 9cd71b9de8b3ead48d9ac31a71d2743276b21648)
    (cherry picked from commit 297c8b078b822622fd3e8c9365f1e03bcd691e53)

tags: added: in-stable-train
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.