From: John Griffith Date: Fri, 17 May 2013 20:03:38 +0000 (-0600) Subject: Update/Publish volume service updates on delete. X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=642526013c855e88873ecb96e8680698e095d83a;p=openstack-build%2Fcinder-build.git Update/Publish volume service updates on delete. The Filter scheduler weighing function was failing because we were only updating the capacity info either on the periodic 60 second interval or after succesful creates. The result was that if you exceeded your capacity within the update interval you would no longer be able to create volumes even if you deleted existing volumes until the update was performed and published. Since we're updating on on create, there's no reason why we shouldn't do the same on delete for the applicable volume-service. The periodic updates are still important for other purposes so they're left alone, but with this change we keep things up to date so the filter scheduler has the correct picture of the world. Fixes bug: 1180976 Change-Id: Ic551f512c5a0cf51bafa8b60f0b6b7debbe22692 --- diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index fecbffe22..82871a538 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -45,7 +45,6 @@ from oslo.config import cfg from cinder import context from cinder import exception -from cinder import flags from cinder.image import glance from cinder import manager from cinder.openstack.common import excutils @@ -57,7 +56,6 @@ from cinder import quota from cinder import utils from cinder.volume.configuration import Configuration from cinder.volume import utils as volume_utils -from cinder.volume import volume_types LOG = logging.getLogger(__name__) @@ -451,6 +449,8 @@ class VolumeManager(manager.SchedulerDependentManager): if reservations: QUOTAS.commit(context, reservations, project_id=project_id) + self.publish_service_capabilities(context) + return True def create_snapshot(self, context, volume_id, snapshot_id):