Stop overwriting thread local context in ClientRouter
In commit 4df0869, a ClientRouter was added to cache client connections
to cell message queues. The periodic task for removing stale clients
is called with an empty RequestContext, but this overwrites the copy
in thread local storage unless overwrite=False is specified.
This adds overwrite=False to the empty RequestContext to prevent it
from overwriting the thread local context. All of the other periodic
tasks use get_admin_context() which also creates a RequestContext with
overwrite=False.
Closes-Bug: #1627838
Change-Id: I48024952865fe017e0cb786567b5b445b05e7659
(cherry picked from commit d218f0df65729e2818a63a22f9eb476d376e168e)
Reviewed: https:/ /review. openstack. org/378751 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=35f7942ff9a 6dd972994dfa416 2c96eaf0b21e02
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit 35f7942ff9a6dd9 72994dfa4162c96 eaf0b21e02
Author: melanie witt <email address hidden>
Date: Mon Sep 26 20:08:33 2016 +0000
Stop overwriting thread local context in ClientRouter
In commit 4df0869, a ClientRouter was added to cache client connections
to cell message queues. The periodic task for removing stale clients
is called with an empty RequestContext, but this overwrites the copy
in thread local storage unless overwrite=False is specified.
This adds overwrite=False to the empty RequestContext to prevent it False.
from overwriting the thread local context. All of the other periodic
tasks use get_admin_context() which also creates a RequestContext with
overwrite=
Closes-Bug: #1627838
Change-Id: I48024952865fe0 17e0cb786567b5b 445b05e7659 818a63a22f9eb47 6d376e168e)
(cherry picked from commit d218f0df65729e2