Huawei driver: Failed to create snap volume if no available resource pool

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

Bug Description

If no available resource pool, we still can create snapshot and active it. But the snapshot will stop automatically if IOs writed to the src LUN. In this situation, we will failed to create snap volume. The driver should check whether resource pool is available when creating snapshot.

-------------------------------------------------------------
2013-03-01 06:27:55 DEBUG cinder.volume.drivers.huawei.huawei_iscsi [req-e775fc16-66a0-4ece-a7f8-fc850ec5619c 035591d45e0c4deab9f694c2813b43b6 4112c008dcd54c1b9f08444f22ab6e3f] _name_translate:Name in cinder: snapshot-5b9ae121-8e82-4e92-839a-60cf75b93310, new name in storage system: OpenStack_-3976001963395115169 _name_translate /usr/lib/python2.7/dist-packages/cinder/volume/drivers/huawei/huawei_iscsi.py:782
2013-03-01 06:27:55 DEBUG cinder.volume.drivers.huawei.huawei_iscsi [req-e775fc16-66a0-4ece-a7f8-fc850ec5619c 035591d45e0c4deab9f694c2813b43b6 4112c008dcd54c1b9f08444f22ab6e3f] _name_translate:Name in cinder: volume-cca80691-58e2-44f4-b800-8a91802d4b54, new name in storage system: OpenStack_-9126997499992887121 _name_translate /usr/lib/python2.7/dist-packages/cinder/volume/drivers/huawei/huawei_iscsi.py:782
2013-03-01 06:27:55 DEBUG cinder.volume.drivers.huawei.huawei_iscsi [req-e775fc16-66a0-4ece-a7f8-fc850ec5619c 035591d45e0c4deab9f694c2813b43b6 4112c008dcd54c1b9f08444f22ab6e3f] create_volume_from_snapshot:snapshot name:OpenStack_-3976001963395115169, volume name:OpenStack_-9126997499992887121. create_volume_from_snapshot /usr/lib/python2.7/dist-packages/cinder/volume/drivers/huawei/huawei_iscsi.py:469
2013-03-01 06:27:55 DEBUG cinder.volume.drivers.huawei.huawei_iscsi [req-e775fc16-66a0-4ece-a7f8-fc850ec5619c 035591d45e0c4deab9f694c2813b43b6 4112c008dcd54c1b9f08444f22ab6e3f] _get_lun_set_info:Use default prefetch type. Prefetch type:Intelligent. _get_lun_set_info /usr/lib/python2.7/dist-packages/cinder/volume/drivers/huawei/huawei_iscsi.py:626
2013-03-01 06:28:04 ERROR cinder.volume.drivers.huawei.huawei_iscsi [req-e775fc16-66a0-4ece-a7f8-fc850ec5619c 035591d45e0c4deab9f694c2813b43b6 4112c008dcd54c1b9f08444f22ab6e3f] _start_luncopy:Failed to start LUNcopy. LUNcopy id:1 out:Error: LUN is abnormal.
2013-03-01 06:28:04 10485 ERROR cinder.openstack.common.rpc.amqp [-] Exception during message handling
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp Traceback (most recent call last):
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/rpc/amqp.py", line 276, in _process_data
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp rval = self.proxy.dispatch(ctxt, version, method, **args)
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/rpc/dispatcher.py", line 145, in dispatch
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp return getattr(proxyobj, method)(ctxt, **kwargs)
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 163, in create_volume
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp volume_ref['id'], {'status': 'error'})
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp self.gen.next()
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 140, in create_volume
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp snapshot_ref)
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/huawei/huawei_iscsi.py", line 508, in create_volume_from_snapshot
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp self._delete_volume(volume_name, volume_id)
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp self.gen.next()
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/huawei/huawei_iscsi.py", line 502, in create_volume_from_snapshot
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp self._start_luncopy(luncopy_id)
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/huawei/huawei_iscsi.py", line 1273, in _start_luncopy
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp raise exception.VolumeBackendAPIException(data=err_msg)
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: _start_luncopy:Failed to start LUNcopy. LUNcopy id:1 out:Error: LUN is abnormal.
2013-03-01 06:28:04 10485 TRACE cinder.openstack.common.rpc.amqp

Tags: drivers
Mike Perez (thingee)
tags: added: drivers
zhangchao (zhangchao010)
Changed in cinder:
assignee: nobody → zhangchao (zhangchao010)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/23338
Committed: http://github.com/openstack/cinder/commit/c09f69948df29e84907960f69fb5ef46745ebef6
Submitter: Jenkins
Branch: master

commit c09f69948df29e84907960f69fb5ef46745ebef6
Author: zhangchao010 <email address hidden>
Date: Tue Mar 5 00:07:41 2013 +0800

    Fix bugs for Huawei driver

    This fixes two bugs for Huawei iscsi driver.
    (1)If firstly we map LUN 1(just not LUN 0) to host,we can also
    find LUN 0 mapped,whose device path is '-'.Then we will failed
    to map a real LUN 0.So,we avoid mapping LUN 0 to host by setting
    every volume's host LUN ID larger than 0,instead of generating it
    automatically.
    (2)Check valid size of resource pools when creating snapshot and
    make sure it larger than 1 GB.

    Fixes bug: 1135618
    Fixes bug: 1136980
    Change-Id: I412e78bf84c95cb51431c45cc084e9ec6a8efb78

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