From: john-griffith Date: Sat, 8 Feb 2014 04:55:22 +0000 (-0700) Subject: Dont set error_extending status on API extend call X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=3a4153e5f256fb5c7c308815c2314d427c31864b;p=openstack-build%2Fcinder-build.git Dont set error_extending status on API extend call Recent change (Ifd523ac5e9039861cf87711dc5c4842b5cb524c2) moved the quota check on extend_volume to the API layer in order to provide feedback to caller if the quota check failed. The problem is that change still sets the volume status to error_extending if the quota check fails. There's no reason to do this if we're now giving immediate feedback that the call failed. I'm also unclear on what the purpose of adding the reservations to the rpc call are, but I'll double check on that before changing. This patch leaves most of the previous change in place but removes the setting of error_extending to the volumes status on the quota fail. Change-Id: I8521c876b8d5c344713f211fa0c8c0c58a12a879 --- diff --git a/cinder/volume/api.py b/cinder/volume/api.py index 2e4a746d8..533b2f48d 100644 --- a/cinder/volume/api.py +++ b/cinder/volume/api.py @@ -763,8 +763,6 @@ class API(base.Base): try: reservations = QUOTAS.reserve(context, gigabytes=+size_increase) except exception.OverQuota as exc: - self.db.volume_update(context, volume['id'], - {'status': 'error_extending'}) usages = exc.kwargs['usages'] quotas = exc.kwargs['quotas']