]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix incorrect usage of get_flow in volume.manager
authorJohn Griffith <john.griffith@solidfire.com>
Fri, 9 Jan 2015 23:58:06 +0000 (23:58 +0000)
committerJohn Griffith <john.griffith@solidfire.com>
Fri, 9 Jan 2015 23:58:06 +0000 (23:58 +0000)
commit192576c468b51b17998fb73b00074b102a3ab5f9
tree53713a80699930b6862e5ae76c11a3bca1d0b992
parent5993660498f44e96b0f35ccc0f4d4a4c7b430363
Fix incorrect usage of get_flow in volume.manager

The call to flows.manager.create_volume.get_flow in cinder.volume.manager's
create_volume method is passing in keyword args where the flows manager is
actually expecting positional arguments. The good thing is that most of these
seem to evaluate to boolean values and are evaluated as True, so they don't
fail; however the behavior isn't going to be exactly as expected here.

The method signature in flows.manager.create_volume:

    def get_flow(context, db, driver, scheduler_rpcapi, host, volume_id,
             allow_reschedule, reschedule_context, request_spec,
             filter_properties, snapshot_id=None, image_id=None,
             source_volid=None, source_replicaid=None,
             consistencygroup_id=None):

Meanwhile the call in cinder.volume.manager.create_volume:

            flow_engine = create_volume.get_flow(
                context_elevated,
                self.db,
                self.driver,
                self.scheduler_rpcapi,
                self.host,
                volume_id,
                snapshot_id=snapshot_id,
                image_id=image_id,
                source_volid=source_volid,
                source_replicaid=source_replicaid,
                consistencygroup_id=consistencygroup_id,
                allow_reschedule=allow_reschedule,
                reschedule_context=context,
                request_spec=request_spec,
                filter_properties=filter_properties)

Change-Id: I0ec8c7e754521e418f534e199e58fa7e4ef01499
Closes-Bug: #1409168
cinder/volume/manager.py