hba['target_wwn'] key error

Bug #1718690 reported by Chhavi Agarwal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-brick
Fix Released
Undecided
Chhavi Agarwal

Bug Description

discovery rescan_hosts fails with the below KeyError
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager [req-b2c098c1-9476-4c29-893e-7def556b9996 0688b01e6439ca32d698d20789d52169126fb41fb1a4ddafcebb97d854e836c9 adc5626d929449ed8c43aa5f830a2942 - default default] Failed to copy volume 0f5136a4-a40b-45ac-bd4d-4842ca90a416 to 3d2278fe-a26a-49c4-87b3-d44e5b3c64ab: KeyError: 'target_wwn'
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager Traceback (most recent call last):
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 2079, in _migrate_volume_generic
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager self._copy_volume_data(ctxt, volume, new_volume, remote='dest')
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 1975, in _copy_volume_data
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager force=True)
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager self.force_reraise()
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager six.reraise(self.type_, self.value, self.tb)
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 1968, in _copy_volume_data
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager attach_encryptor=attach_encryptor)
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 1895, in _attach_volume
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager attach_info = self._connect_device(conn)
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 1859, in _connect_device
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager vol_handle = connector.connect_volume(conn['data'])
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/os_brick/utils.py", line 137, in trace_logging_wrapper
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager return f(*args, **kwargs)
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 271, in inner
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager return f(*args, **kwargs)
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/os_brick/initiator/connectors/fibre_channel.py", line 170, in connect_volume
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager timer.start(interval=2).wait()
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/eventlet/event.py", line 121, in wait
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager return hubs.get_hub().switch()
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 294, in switch
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager return self.greenlet.switch()
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/oslo_service/loopingcall.py", line 144, in _run_loop
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager result = func(*self.args, **self.kw)
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/os_brick/initiator/connectors/fibre_channel.py", line 162, in _wait_for_device_discovery
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager connection_properties['target_lun'])
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/os_brick/initiator/linuxfc.py", line 297, in rescan_hosts
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager for wwpn in hba['target_wwn']:
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager KeyError: 'target_wwn'
2017-09-21 09:52:09.016 30851 ERROR cinder.volume.manager

Changed in os-brick:
assignee: nobody → Chhavi Agarwal (chhagarw)
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/506578

Changed in os-brick:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-brick (master)

Reviewed: https://review.openstack.org/506578
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=f3ed50778902f17bd35ece2a9adbef87764c85fd
Submitter: Jenkins
Branch: master

commit f3ed50778902f17bd35ece2a9adbef87764c85fd
Author: Chhavi Agarwal <email address hidden>
Date: Fri Sep 22 05:31:36 2017 -0400

    rescan fails for hba missing target wwn

    rescan should skip processing the hbas missing target_wwn.

    Change-Id: I43d8984c8a464a59b4c41a50848bbb3d05f2835e
    Closes-Bug: #1718690

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

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/507361

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

Reviewed: https://review.openstack.org/507361
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=c0926043aab4cd2dd8e9ebb30a398c9f8562b5cc
Submitter: Jenkins
Branch: stable/pike

commit c0926043aab4cd2dd8e9ebb30a398c9f8562b5cc
Author: Chhavi Agarwal <email address hidden>
Date: Fri Sep 22 05:31:36 2017 -0400

    rescan fails for hba missing target wwn

    rescan should skip processing the hbas missing target_wwn.

    Change-Id: I43d8984c8a464a59b4c41a50848bbb3d05f2835e
    Closes-Bug: #1718690
    (cherry picked from commit f3ed50778902f17bd35ece2a9adbef87764c85fd)

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

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

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

This issue was fixed in the openstack/os-brick 2.0.0 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.