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
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
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__)
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):