yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #50373
[Bug 1545041] Re: Error 500 on resize when hitting quota
Reviewed: https://review.openstack.org/280382
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=e7390c114dc72639da01d9ad3dff31ec307e2777
Submitter: Jenkins
Branch: master
commit e7390c114dc72639da01d9ad3dff31ec307e2777
Author: jichenjc <jichenjc@xxxxxxxxxx>
Date: Fri Jan 29 18:25:50 2016 +0800
Add instances into dict when handle exception
Currently the instances is missing in dict when processing
_get_headroom and lead to KeyError, so we should add it
and because it's 'resize', fixed value 1 can be used.
Change-Id: I92c7855601186d37fa516c4272705727dcfc847a
Closes-Bug: 1545041
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1545041
Title:
Error 500 on resize when hitting quota
Status in OpenStack Compute (nova):
Fix Released
Bug description:
There's always KeyError exception when processing OverQuota in resize:
File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 2697, in resize
headroom = self._get_headroom(quotas, usages, deltas)
File "/usr/lib/python2.7/dist-packages/nova/compute/api.py", line 384, in _get_headroom
hr = headroom['instances'] * deltas['ram']
KeyError: 'instances'
This is because "quotas" parameter in OverQuota argument only contains
"cores" and "ram" resources (quota difference for resize operation),
but _get_headroom method expects "instances" resource to be present.
test_resize_quota_exceeds_fails does not handle this situation,
because "quotas" used in this test is "{'resource': 0}" and does not
trigger this branch of code in _get_headroom.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1545041/+subscriptions
References