]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Dont set error_extending status on API extend call
authorjohn-griffith <john.griffith@solidfire.com>
Sat, 8 Feb 2014 04:55:22 +0000 (21:55 -0700)
committerjohn-griffith <john.griffith@solidfire.com>
Sat, 8 Feb 2014 04:58:53 +0000 (21:58 -0700)
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

cinder/volume/api.py

index 2e4a746d8df0733fc3e300dff12ef3a90ca32b6d..533b2f48d22f028cd3ecec166351341041538652 100644 (file)
@@ -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']