Commit 453d28fe authored by Christos Stavrakakis's avatar Christos Stavrakakis

cyclades: Fix bug in calculation of quotas

Count all instance's volumes if the server's operstate is 'ERROR'.
parent 24c2d8df
......@@ -358,7 +358,7 @@ def get_commission_info(resource, action, action_fields=None):
return None
elif action == "DESTROY":
volumes = resource.volumes.filter(deleted=False)
if resource.operstate != "BUILD":
if resource.operstate not in ["BUILD", "ERROR"]:
# Count only the volumes that are in the 'IN_USE' status,
# because a pending commission exists for the other volumes.
# The pending commission will be rejected, but
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment