AttributeError occurs when Huawei HVS driver attaching volume with incorrect target IP

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

Bug Description

If the iscsi target port IP is set incorrectly, the driver will get a None value. Here the dirver should raise an exception.

The log:
2013-09-26 00:39:41.832 ERROR cinder.openstack.common.rpc.amqp [req-c8478604-b0fd-47f4-a86e-4d6ac5e92bb8 46d5d9f00d9d4d86845ec9f57b5399d5 f5aa9910f241481e9518f331be373d32] Exception during message handling
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp Traceback (most recent call last):
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/openstack/common/rpc/amqp.py", line 441, in _process_data
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp **args)
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/openstack/common/rpc/dispatcher.py", line 148, in dispatch
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp return getattr(proxyobj, method)(ctxt, **kwargs)
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/manager.py", line 561, in initialize_connection
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp conn_info = self.driver.initialize_connection(volume, connector)
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/drivers/huawei/huawei_hvs.py", line 78, in initialize_connection
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp return self.common.initialize_connection_iscsi(volume, connector)
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/drivers/huawei/rest_common.py", line 518, in initialize_connection_iscsi
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp (iscsi_iqn, target_ip) = self._get_iscsi_params(connector)
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/drivers/huawei/rest_common.py", line 1287, in _get_iscsi_params
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp target_iqn = self._get_tgt_iqn(target_ip)
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp File "/opt/stack/cinder/cinder/volume/drivers/huawei/rest_common.py", line 1087, in _get_tgt_iqn
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp split_list = ip_info.split(".")
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp AttributeError: 'NoneType' object has no attribute 'split'
2013-09-26 00:39:41.832 TRACE cinder.openstack.common.rpc.amqp
2013-09-26 00:39:41.833 ERROR cinder.openstack.common.rpc.common [req-c8478604-b0fd-47f4-a86e-4d6ac5e92bb8 46d5d9f00d9d4d86845ec9f57b5399d5 f5aa9910f241481e9518f331be373d32] Returning exception 'NoneType' object has no attribute 'split' to caller

Tags: drivers huawei
zhangchao (zhangchao010)
Changed in cinder:
assignee: nobody → zhangchao (zhangchao010)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

tags: added: drivers huawei
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/50539
Committed: http://github.com/openstack/cinder/commit/7aa0c1d9a4a02add6b00aeb764e9ba86a3c460ff
Submitter: Jenkins
Branch: master

commit 7aa0c1d9a4a02add6b00aeb764e9ba86a3c460ff
Author: zhangchao010 <email address hidden>
Date: Mon Oct 14 13:08:02 2013 +0800

    Fix Huawei HVS driver AttributeError

    This patch checks the iSCSI port info and raises an exception
    if it can not get the port info from the configuration.

    Closes-bug: #1237185
    Change-Id: I341ccbe77abd25421e5ee0b2d07ace3759fbccef

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: icehouse-1 → 2014.1
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.