From: Patrick East Date: Wed, 2 Sep 2015 20:51:42 +0000 (-0700) Subject: Get full volume model in Replication manager API’s X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=01ff9d7dc7af54eaa218ef86839b0468de283c7e;p=openstack-build%2Fcinder-build.git Get full volume model in Replication manager API’s Currently we pass in a dictionary of the volume properties, but not the actual volume model. This dictionary is missing some of the properties like ‘name’ which backends may required for volume operations. Change-Id: Idcb7b2c8313360a77ba336f3b7534d8fa7431a41 Closes-Bug: #1491585 --- diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index 293777b0e..8b413ae7a 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -3058,6 +3058,7 @@ class VolumeManager(manager.SchedulerDependentManager): :param secondary: Specifies rep target to fail over to """ try: + volume = self.db.volume_get(context, volume['id']) volume_updates = self.driver.replication_failover(context, volume, secondary) @@ -3153,6 +3154,7 @@ class VolumeManager(manager.SchedulerDependentManager): """ try: + volume = self.db.volume_get(context, volume['id']) replication_targets = self.driver.list_replication_targets(context, volume)