Bug 1674259 - [OSP10] VNX driver sends a remove_hba() to storops instead of delete_hba()
Summary: [OSP10] VNX driver sends a remove_hba() to storops instead of delete_hba()
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z11
: 10.0 (Newton)
Assignee: Eric Harney
QA Contact: Tzach Shefi
Tana
URL:
Whiteboard:
Depends On:
Blocks: 1684207
TreeView+ depends on / blocked
 
Reported: 2019-02-10 15:11 UTC by David Vallee Delisle
Modified: 2023-10-06 18:11 UTC (History)
10 users (show)

Fixed In Version: openstack-cinder-9.1.4-50.el7ost
Doc Type: Bug Fix
Doc Text:
Previously, volume detach operations were not working. This was because a function was renamed that the cinder VNX driver calls when detaching a volume. The VNX driver would crash when it tried to invoke the old function name. This issue has been resolved by updating the VNX driver to use the new function name.
Clone Of:
Environment:
Last Closed: 2019-10-16 10:49:13 UTC
Target Upstream Version:
Embargoed:
tshefi: automate_bug-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github emc-openstack/storops/commit/20122977c0820125bc9749f986a73052bca4d4c8 0 None None None 2020-07-15 14:33:58 UTC
Launchpad 1813525 0 None None None 2019-02-10 15:12:21 UTC
OpenStack gerrit 636064 0 None MERGED VNX Driver: delete_hba() instead of remove_hba() 2020-12-02 04:37:16 UTC
OpenStack gerrit 636213 0 None MERGED VNX Driver: delete_hba() instead of remove_hba() 2020-12-02 04:37:16 UTC
Red Hat Issue Tracker OSP-29348 0 None None None 2023-10-06 18:11:48 UTC

Description David Vallee Delisle 2019-02-10 15:11:29 UTC
Description of problem:
When we enable "initiator_auto_deregister" and all the volumes are detached from a compute node, the last volume fails to fully detached because the VNX driver is failing to deregister the initiator

Version-Release number of selected component (if applicable):
master branch

How reproducible:
All the time

Steps to Reproduce:
1. Enable initiator_auto_deregister on vnx driver
2. Detach all volumes from instances on a compute node

Actual results:
Last volume will remain in detaching [1] and we have this traceback [2] in volume.log

Expected results:
It sould detach and deregister the initiator.

Additional info:

[1]
~~~
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
| Field                          | Value                                                                                                                                          |
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
| attachments                    | [{u'server_id': u'f0acbadf-8452-49b4-83f3-d7f23d9a5e5d', u'attachment_id': u'4dd4d3a9-7a41-433d-82d2-7c99450fcaa7', u'attached_at':            |
|                                | u'2019-02-07T21:36:27.000000', u'host_name': None, u'volume_id': u'8fd10445-cf58-4b2c-a4d5-4619c368ff03', u'device': u'/dev/vdb', u'id':       |
|                                | u'8fd10445-cf58-4b2c-a4d5-4619c368ff03'}]                                                                                                      |
| availability_zone              | nova                                                                                                                                           |
| bootable                       | false                                                                                                                                          |
| consistencygroup_id            | None                                                                                                                                           |
| created_at                     | 2019-02-07T21:32:34.000000                                                                                                                     |
| description                    | None                                                                                                                                           |
| encrypted                      | False                                                                                                                                          |
| id                             | 8fd10445-cf58-4b2c-a4d5-4619c368ff03                                                                                                           |
| migration_status               | None                                                                                                                                           |
| multiattach                    | False                                                                                                                                          |
| name                           | admin_test1                                                                                                                                    |
| os-vol-host-attr:host          | hostgroup@vnx_iscsi#somepool                                                                                   |
| os-vol-mig-status-attr:migstat | None                                                                                                                                           |
| os-vol-mig-status-attr:name_id | None                                                                                                                                           |
| os-vol-tenant-attr:tenant_id   | 08ad00ba2dd34ae6ad30c788eea2aacc                                                                                                               |
| properties                     | attached_mode='rw', readonly='False', snapcopy='False'                                                                                         |
| replication_status             | disabled                                                                                                                                       |
| size                           | 1                                                                                                                                              |
| snapshot_id                    | None                                                                                                                                           |
| source_volid                   | None                                                                                                                                           |
| status                         | detaching                                                                                                                                      |
| type                           | allflash                                                                                                                                       |
| updated_at                     | 2019-02-08T16:28:47.000000                                                                                                                     |
| user_id                        | 480a0bd09dee4b54935d2573eaf93d88                                                                                                               |
+--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
~~~

[2]
~~~
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager [req-a496c8a6-1e2f-4360-98bf-bd5aac2fec89 480a0bd09dee4b54935d2573eaf93d88 08ad00ba2dd34ae6ad30c788eea2aacc - default default] Terminate volume connection failed: 'VNXSystem' does not contain attribute 'remove_hba'
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager Traceback (most recent call last):
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 1572, in terminate_connection
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager     force=force)
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/zonemanager/utils.py", line 105, in decorator
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager     conn_info = terminate_connection(self, *args, **kwargs)
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/emc/vnx/driver.py", line 209, in terminate_connection
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager     conn_info = self.adapter.terminate_connection(volume, connector)
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/emc/vnx/adapter.py", line 921, in terminate_connection
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager     return self._terminate_connection(volume, connector)
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/emc/vnx/adapter.py", line 941, in _terminate_connection
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager     self.terminate_connection_cleanup(host, sg)
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/emc/vnx/adapter.py", line 979, in terminate_connection_cleanup
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager     self._destroy_empty_sg(host, sg)
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/emc/vnx/adapter.py", line 987, in _destroy_empty_sg
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager     self._deregister_initiator(host)
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/emc/vnx/adapter.py", line 1001, in _deregister_initiator
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager     self.client.deregister_initiators(initiators)
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/emc/vnx/client.py", line 500, in deregister_initiators
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager     self.vnx.remove_hba(initiator_uid)
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/storops/lib/resource.py", line 172, in __getattr__
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager     ret = self._get_property_from_raw(item)
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/storops/vnx/resource/__init__.py", line 113, in _get_property_from_raw
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager     value = super(VNXCliResource, self)._get_property_from_raw(item)
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/storops/lib/resource.py", line 193, in _get_property_from_raw
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager     self.__class__.__name__, item))
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager AttributeError: 'VNXSystem' does not contain attribute 'remove_hba'
2019-02-08 16:29:03.927 502744 ERROR cinder.volume.manager
~~~

Comment 1 David Vallee Delisle 2019-02-11 15:07:45 UTC
Apparently, this change introduced in the storops driver [1] in 2016 has broken this feature since then.

[1] https://github.com/emc-openstack/storops/commit/20122977c0820125bc9749f986a73052bca4d4c8

Comment 28 Alan Bishop 2019-10-15 14:20:29 UTC
Moving to VERIFIED based on comment #26.

Comment 29 Lon Hohberger 2019-10-16 10:49:13 UTC
According to our records, this should be resolved by openstack-cinder-9.1.4-53.el7ost.  This build is available now.


Note You need to log in before you can comment on or make changes to this bug.