Storwize_SVC Create volume with replication type associate to qos-spec will always be failed.

Bug #1379654 reported by yixuan zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Vincent Hou
Juno
Fix Released
Undecided
Unassigned

Bug Description

Test step :
1. Create a qos spec :
cinder qos-create qos-spec qos:IOThrottling=30000
2. Create type-1 with Pool-1 without replication.
3. Create type-2 with Primary Pool-1 and Secondary Pool-2, replication =TRUE.
4. qos-spec associate to type-1 and type-2.
cinder qos-associate qos-spec type-1
cinder qos-associate qos-spec type-2
5. cinder create --volume-type type-1 1 ,
The volume creation will be successed.
6. cinder create --volume-type type-2 1.
The volume creation will be failed.

Check the cinder log , it was found:

screen-c-sch.2014-09-11-151843.log:2014-10-10 14:01:41.497 ERROR cinder.scheduler.filter_scheduler [[[01;36mreq-9d20b04b-94fc-4936-a9c8-12a41690e313 ^[[00;36m22e6c0f1cabc4e0ea8a7191e6942500a e83fd5b227c64ca3be40186d35670b3e] ^[[01;35mError scheduling None from last vol-service: ubuntu247@driver4#driver4 : [u'Traceback (most recent call last):\n', u' File "/usr/local/lib/python2.7/dist-packages/taskflow/engines/action_engine/executor.py", line 35, in execute_task\n result = task.execute(**arguments)\n', u' File "/opt/stack/cinder/cinder/volume/flows/manager/create_volume.py", line 624, in execute\n **volume_spec)\n', u' File "/opt/stack/cinder/cinder/volume/flows/manager/create_volume.py", line 598, in _create_raw_volume\n return self.driver.create_volume(volume_ref)\n', u' File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper\n return f(*args, **kwargs)\n', u' File "/opt/stack/cinder/cinder/volume/drivers/ibm/storwize_svc/init.py", line 571, in create_volume\n model_update = self.replication.create_replica(ctxt, volume)\n', u' File "/opt/stack/cinder/cinder/volume/drivers/ibm/storwize_svc/replication.py", line 78, in create_replica\n self.driver.add_vdisk_copy(volume[\'name\'], dest_pool, vol_type)\n', u' File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper\n return f(*args, **kwargs)\n', u' File "/opt/stack/cinder/cinder/volume/drivers/ibm/storwize_svc/init_.py", line 661, in add_vdisk_copy\n self.configuration)\n', u' File "/opt/stack/cinder/cinder/volume/drivers/ibm/storwize_svc/helpers.py", line 858, in add_vdisk_copy\n volume_type=volume_type)\n', u' File "/opt/stack/cinder/cinder/volume/drivers/ibm/storwize_svc/helpers.py", line 561, in get_vdisk_params\n kvs = qos_specs.get_qos_specs(ctxt, qos_specs_id)[\'specs\']\n', u"UnboundLocalError: local variable 'ctxt' referenced before assignment\n"]

Revision history for this message
yixuan zhang (yixuan-z) wrote :
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/127439

Changed in cinder:
assignee: nobody → Vincent Hou (houshengbo)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/127439
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=afcbfe053c9165ab84af30c8e663dfaee2a79e81
Submitter: Jenkins
Branch: master

commit afcbfe053c9165ab84af30c8e663dfaee2a79e81
Author: Vincent Hou <email address hidden>
Date: Fri Oct 10 15:46:36 2014 +0800

    IBM Storwize driver: Add local variable assignment to "ctxt"

    * The method get_vdisk_params in helpers.py is missing a local variable
    assignment for "ctxt", causing "UnboundLocalError: local variable
    'ctxt' referenced before assignment. Adding the assignment should
    resolve this issue.

    * Add the unit tests coverage for get_vdisk_params.

    Change-Id: I564b1ef8cd1b6504d5ac8c9af0bb11bf29767d9a
    closes-bug: #1379654

Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/135511

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/juno)

Reviewed: https://review.openstack.org/135511
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=423f7020ef7d0b70242947ebaa4389a7264c3a2e
Submitter: Jenkins
Branch: stable/juno

commit 423f7020ef7d0b70242947ebaa4389a7264c3a2e
Author: Vincent Hou <email address hidden>
Date: Fri Oct 10 15:46:36 2014 +0800

    IBM Storwize driver: Add local variable assignment to "ctxt"

    * The method get_vdisk_params in helpers.py is missing a local variable
    assignment for "ctxt", causing "UnboundLocalError: local variable
    'ctxt' referenced before assignment. Adding the assignment should
    resolve this issue.

    * Add the unit tests coverage for get_vdisk_params.

    Change-Id: I564b1ef8cd1b6504d5ac8c9af0bb11bf29767d9a
    closes-bug: #1379654
    (cherry picked from commit afcbfe053c9165ab84af30c8e663dfaee2a79e81)

tags: added: in-stable-juno
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.