commit af4ce3ee63e4e4af9113405396c3201eb3efe3c6
Author: Matt Riedemann <email address hidden>
Date: Thu Mar 26 13:46:40 2015 -0700
Add debug logging to quota_reserve flow
There are some places in the quota_reserve flow that could use some
debug logging for helping to figure out the problem when we over quota:
1. Log when we detect a desync in _is_quota_refresh_needed and force a
refresh.
2. There is a comment in quota_reserve after we call _refresh_quota_usages saying we assume the sync was OK and
essentially everything is hunky dory. Log if we actually refreshed
without a change to usage.
3. Log the details from project/user quotas/usages when we go over
quota in _calculate_overquota.
4. Log if we update project_usages using values from user_usages in quota_reserve.
5. Finally, before we raise the OverQuota exception in quota_reserve,
the user_usages dict values are UserQuota objects which are sqla
dict-like objects and don't stringify nicely for the logs, so
convert those to actual dict values for logging.
Reviewed: https:/ /review. openstack. org/168158 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=af4ce3ee63e 4e4af9113405396 c3201eb3efe3c6
Committed: https:/
Submitter: Jenkins
Branch: master
commit af4ce3ee63e4e4a f9113405396c320 1eb3efe3c6
Author: Matt Riedemann <email address hidden>
Date: Thu Mar 26 13:46:40 2015 -0700
Add debug logging to quota_reserve flow
There are some places in the quota_reserve flow that could use some
debug logging for helping to figure out the problem when we over quota:
1. Log when we detect a desync in _is_quota_ refresh_ needed and force a
_refresh_ quota_usages saying we assume the sync was OK and overquota.
quota_reserve.
refresh.
2. There is a comment in quota_reserve after we call
essentially everything is hunky dory. Log if we actually refreshed
without a change to usage.
3. Log the details from project/user quotas/usages when we go over
quota in _calculate_
4. Log if we update project_usages using values from user_usages in
5. Finally, before we raise the OverQuota exception in quota_reserve,
the user_usages dict values are UserQuota objects which are sqla
dict-like objects and don't stringify nicely for the logs, so
convert those to actual dict values for logging.
Related-Bug: #1353962
Change-Id: Ic6e3d5fdf51c0a 13c97509d0888a3 bba00fb3193