From: Eric Harney Date: Thu, 19 Nov 2015 20:01:25 +0000 (-0500) Subject: Manage existing: fix volume object saving X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=e151aecab2dfd1ff37a01e38e1232a170bd5a13b;p=openstack-build%2Fcinder-build.git Manage existing: fix volume object saving This needs an update to work with volume objects. Currently, manage existing can fail here. Change-Id: I9197220be201cbbb1cd8266ebb58b57641fc216f Closes-Bug: #1518050 --- diff --git a/cinder/volume/flows/manager/manage_existing.py b/cinder/volume/flows/manager/manage_existing.py index dcbd8ae37..9d2ac1886 100644 --- a/cinder/volume/flows/manager/manage_existing.py +++ b/cinder/volume/flows/manager/manage_existing.py @@ -79,8 +79,8 @@ class ManageExistingTask(flow_utils.CinderTask): model_update = {} model_update.update({'size': size}) try: - volume_ref = self.db.volume_update(context, volume_ref['id'], - model_update) + volume_ref.update(model_update) + volume_ref.save() except exception.CinderException: LOG.exception(_LE("Failed updating model of volume %(volume_id)s" " with creation provided model %(model)s") %