summaryrefslogtreecommitdiffstats
path: root/nova/scheduler/rpcapi.py
diff options
context:
space:
mode:
authorZhiteng Huang <zhiteng.huang@intel.com>2012-09-18 08:50:17 +0800
committerRussell Bryant <rbryant@redhat.com>2012-09-18 17:29:21 -0400
commit28e6abf200d50d2d1c4a043c37cd3b3318d8933d (patch)
tree74992ae38b42d85faca7f088d00b5d44c58557e6 /nova/scheduler/rpcapi.py
parentfe916c95cfdaf4aeb1fdbfd57421b7d1222e7d4b (diff)
downloadnova-28e6abf200d50d2d1c4a043c37cd3b3318d8933d.tar.gz
nova-28e6abf200d50d2d1c4a043c37cd3b3318d8933d.tar.xz
nova-28e6abf200d50d2d1c4a043c37cd3b3318d8933d.zip
Update quota when deleting volume that failed to be scheduled
If one volume was failed to get scheduled, removing such volume should also clean up reservation. Also when create_volume is ready to send to scheduler, reservation should be committed no matter backend can successfully create that volume or not since deleting volume call will do a minus reservation even on volume with 'error' status. This change updates RPC API to version 2.2 Fix bug 1052052 Change-Id: Ia632a0e49318d534f0acbd3df5c9f6bb86eefa2a
Diffstat (limited to 'nova/scheduler/rpcapi.py')
-rw-r--r--nova/scheduler/rpcapi.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/nova/scheduler/rpcapi.py b/nova/scheduler/rpcapi.py
index f36578dab..2c280be44 100644
--- a/nova/scheduler/rpcapi.py
+++ b/nova/scheduler/rpcapi.py
@@ -45,6 +45,7 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
2.0 - Remove 1.x backwards compat
2.1 - Add image_id to create_volume()
+ 2.2 - Remove reservations argument to create_volume()
'''
#
@@ -94,13 +95,12 @@ class SchedulerAPI(nova.openstack.common.rpc.proxy.RpcProxy):
disk_over_commit=disk_over_commit, instance=instance_p,
dest=dest))
- def create_volume(self, ctxt, volume_id, snapshot_id, image_id,
- reservations):
+ def create_volume(self, ctxt, volume_id, snapshot_id, image_id):
self.cast(ctxt,
self.make_msg('create_volume',
volume_id=volume_id, snapshot_id=snapshot_id,
- image_id=image_id, reservations=reservations),
- version='2.1')
+ image_id=image_id),
+ version='2.2')
def update_service_capabilities(self, ctxt, service_name, host,
capabilities):