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 on 2018-01-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-brick
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) on 2018-01-30
Changed in os-brick:
assignee: nobody → Sam Wan (sam-wan)

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

Changed in os-brick:
status: New → In Progress

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

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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers