Fix mysql checkout handler AttributeError

If the mysql_on_checkout handler encountered an error due to
disconnect, it would fail with an AttributeError,

 AttributeError: 'module' object has no attribute 'warn'

This is because it used the logging module where the LOG logger
should have been used.

Change-Id: Iae8a9bd4aeee6e35508059c20b92d70c36232963
Closes-Bug: #1234873
(cherry picked from commit d973ea9a47a6f9892208722f69a0cd127b2f73dc)
Handle DB2 disconnect

If the DB2 server was restarted, database connections would fail,
requiring a restart of the Keystone server.

This change adds an on-checkout handler for DB2 similar to the
MySQL handler.

Change-Id: Ie53d9606edac408401961fc6526bb7c99baa836a
Closes-Bug: #1231657
(cherry picked from commit f18dbd7e74303b7e0af97439ed935038e2231feb)
Close the cursor for SQLite for 034 upgrade/downgrade on select

The list() is needed around the table select for SQLite upgrade/downgrade
to work.  This forces a cursor close and prevents database locked errors.

closes-bug: 1233329
Change-Id: I01aedf9d2743a86881c124c9690f10233d9966bc
Merge "Close the cursor for SQLite for 034 upgrade/downgrade on select" into milestone-proposed
Merge "Handle DB2 disconnect" into milestone-proposed
Don't use default value in LimitingReader

We can't simply pass the None default on to the read operation as this
default is handled differently between different wsgi implementations.

Change-Id: I337e797b8dee3dfcf9299fe361cf197a176c8fe2
Fixes: bug 1213106
set user_update policy to admin_required

This changes the default policy.json to prevent users from changing
their own attributes such as password, name, or default_project_id.

Closes-Bug: 1237989
Change-Id: I7de5fff3d72a76b78113e289c57a9fac2096395f
Handle unicode at the caching layer more elegantly

This patchset resolves an issue where in some cases unicode would
cause the cache key generator to raise a UnicodeEncodeError due to
the name/value being outside of the standard ascii character set.
Included is a fix to the cache backend debug code to utilize repr
for passing the keys/values to the logger.

Tests in test_backend provided by chenxiao <chenxiao@cn.ibm.com>

Closes-bug: 1237892
Change-Id: Ic99503987851128cd41d83ad1ea50dc4a132fbd3
Merge "set user_update policy to admin_required" into milestone-proposed
Fix v2 token user ref with trust impersonation=True

The v2 token controller incorrectly checks for a string instead
of a boolean, which results in the wrong user ID (trustee, when
it should be the trustor) when impersonation=True.  So fix the
comparison and tests, adding a test which illustrates the issue.

Change-Id: Ic94f30f2354c9fda20531bb598387368fde8a096
Closes-Bug: #1239303
Disable lazy gettext

This change disables lazy gettext functionality in Keystone,
due to problems with character encoding and logging
detailed in bug 1225099.

It is part of a series of commits across all projects with
lazy gettext enabled.

Change-Id: Ia934a7df9386baf6ae8eb9ff48c24386c47ecd23
Partial-bug: 1225099
remove runtime dep on python-pbr
sync parameter values with keystone-dist.conf