From: John Griffith Date: Fri, 9 Jan 2015 23:58:06 +0000 (+0000) Subject: Fix incorrect usage of get_flow in volume.manager X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=192576c468b51b17998fb73b00074b102a3ab5f9;p=openstack-build%2Fcinder-build.git 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 --- diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index 6c5194009..ae060b4e6 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -363,15 +363,15 @@ class VolumeManager(manager.SchedulerDependentManager): self.scheduler_rpcapi, self.host, volume_id, + allow_reschedule, + context, + request_spec, + filter_properties, 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) + consistencygroup_id=consistencygroup_id) except Exception: LOG.exception(_LE("Failed to create manager volume flow")) raise exception.CinderException(