nova/nova/db
Matt Riedemann af4ce3ee63 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.

Related-Bug: #1353962

Change-Id: Ic6e3d5fdf51c0a13c97509d0888a3bba00fb3193
2015-03-26 14:15:54 -07:00
..
sqlalchemy Add debug logging to quota_reserve flow 2015-03-26 14:15:54 -07:00
__init__.py Remove vi modelines 2014-02-03 14:19:44 +00:00
api.py Remove service_get_by_args from the DB API 2015-03-06 11:03:09 +00:00
base.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
migration.py Add second migrate_repo for cells v2 database migrations 2015-03-03 15:41:40 -05:00