From 3a4153e5f256fb5c7c308815c2314d427c31864b Mon Sep 17 00:00:00 2001 From: john-griffith Date: Fri, 7 Feb 2014 21:55:22 -0700 Subject: [PATCH] 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 --- cinder/volume/api.py | 2 -- 1 file changed, 2 deletions(-) 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'] -- 2.45.2