Dell EMC VNX FC: call 'os_brick.initiator.connectors.fibre_channel._wait_for_device_discovery' failed: AttributeError: 'NoneType' object has no attribute 'get'

Bug #1746218 reported by Sam Wan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-brick
Fix Released
Undecided
Sam Wan

Bug Description

Dell EMC VNX cinder driver (FC) failed with below errors:
======
Jan 29 22:57:52 cdh2h14 nova-compute[14243]: ERROR oslo.service.loopingcall [None req-5050db0c-c4f9-42fe-b0b3-7ed24f55aad9 tempest-TestVolumeSwap-11175782 tempest-TestVolumeSwap-11175782]
Fixed interval looping call 'os_brick.initiator.connectors.fibre_channel._wait_for_device_discovery' failed: AttributeError: 'NoneType' object has no attribute 'get'
Jan 29 22:57:52 cdh2h14 nova-compute[14243]: ERROR oslo.service.loopingcall Traceback (most recent call last):
Jan 29 22:57:52 cdh2h14 nova-compute[14243]: ERROR oslo.service.loopingcall File "/usr/local/lib/python2.7/dist-packages/oslo_service/loopingcall.py", line 137, in _run_loop
Jan 29 22:57:52 cdh2h14 nova-compute[14243]: ERROR oslo.service.loopingcall result = func(*self.args, **self.kw)
Jan 29 22:57:52 cdh2h14 nova-compute[14243]: ERROR oslo.service.loopingcall File "/usr/local/lib/python2.7/dist-packages/os_brick/initiator/connectors/fibre_channel.py", line 160, in _wa
it_for_device_discovery
Jan 29 22:57:52 cdh2h14 nova-compute[14243]: ERROR oslo.service.loopingcall self._linuxfc.rescan_hosts(hbas, connection_properties)
Jan 29 22:57:52 cdh2h14 nova-compute[14243]: ERROR oslo.service.loopingcall File "/usr/local/lib/python2.7/dist-packages/os_brick/initiator/linuxfc.py", line 84, in rescan_hosts
Jan 29 22:57:52 cdh2h14 nova-compute[14243]: ERROR oslo.service.loopingcall cts = self._get_hba_channel_scsi_target(hba, connection_properties)
Jan 29 22:57:52 cdh2h14 nova-compute[14243]: ERROR oslo.service.loopingcall File "/usr/local/lib/python2.7/dist-packages/os_brick/initiator/linuxfc.py", line 51, in _get_hba_channel_scsi
_target
Jan 29 22:57:52 cdh2h14 nova-compute[14243]: ERROR oslo.service.loopingcall wwpns = conn_props['initiator_target_map'].get(hba['port_name'],
Jan 29 22:57:52 cdh2h14 nova-compute[14243]: ERROR oslo.service.loopingcall AttributeError: 'NoneType' object has no attribute 'get'
Jan 29 22:57:52 cdh2h14 nova-compute[14243]: ERROR oslo.service.loopingcall
======

This is related to https://review.openstack.org/#/c/520052/.

Obviously VNX has 'initiator_target_map' in conn_props but it's 'None'.
We should do sanity check before referring value of a dict key.

Sam Wan (sam-wan)
Changed in os-brick:
assignee: nobody → Sam Wan (sam-wan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-brick (master)

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

Changed in os-brick:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 12.0.0.0rc1

This issue was fixed in the openstack/cinder 12.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on os-brick (master)

Change abandoned by Sam Wan (<email address hidden>) on branch: master
Review: https://review.openstack.org/539184

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-brick (master)

Reviewed: https://review.openstack.org/539184
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=53877a95bc9f4d40315f876c076a7a32817ea904
Submitter: Zuul
Branch: master

commit 53877a95bc9f4d40315f876c076a7a32817ea904
Author: Sam Wan <email address hidden>
Date: Tue Jan 30 06:08:57 2018 -0500

    Handle None value 'inititator_target_map'

    Should check not only if 'initiator_target_map' is in conn_props but
    also its value is not None.

    Change-Id: I7ca0bf5fac20a370097f1c39ce005a1b23814459
    Closes-Bug: #1746218

Changed in os-brick:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-brick 2.8.0

This issue was fixed in the openstack/os-brick 2.8.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-brick (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/696384

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-brick (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/696521

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-brick (stable/queens)

Reviewed: https://review.opendev.org/696384
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=c4e616e3a07009143ed8c840ec38b7c937180d07
Submitter: Zuul
Branch: stable/queens

commit c4e616e3a07009143ed8c840ec38b7c937180d07
Author: Sam Wan <email address hidden>
Date: Tue Jan 30 06:08:57 2018 -0500

    Handle None value 'inititator_target_map'

    Should check not only if 'initiator_target_map' is in conn_props but
    also its value is not None.

    Change-Id: I7ca0bf5fac20a370097f1c39ce005a1b23814459
    Closes-Bug: #1746218
    (cherry picked from commit 53877a95bc9f4d40315f876c076a7a32817ea904)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-brick (stable/rocky)

Reviewed: https://review.opendev.org/696521
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=a15ede0f06ba441b3480354fb01191cde7a358a3
Submitter: Zuul
Branch: stable/rocky

commit a15ede0f06ba441b3480354fb01191cde7a358a3
Author: Sam Wan <email address hidden>
Date: Tue Jan 30 06:08:57 2018 -0500

    Handle None value 'inititator_target_map'

    Should check not only if 'initiator_target_map' is in conn_props but
    also its value is not None.

    Change-Id: I7ca0bf5fac20a370097f1c39ce005a1b23814459
    Closes-Bug: #1746218
    (cherry picked from commit 53877a95bc9f4d40315f876c076a7a32817ea904)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-brick 2.5.9

This issue was fixed in the openstack/os-brick 2.5.9 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-brick queens-eol

This issue was fixed in the openstack/os-brick queens-eol release.

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.