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"]
Fix proposed to branch: master /review. openstack. org/127439
Review: https:/