Move create of ComputeAPI object in websocketproxy
Currently, we create a compute.rpcapi.ComputeAPI object during
NovaProxyRequestHandler.__init__ in order to make calls to nova-compute
for console token authorizations (port validation). This is problematic
in the event that we receive a TCP RST as it results in constructing a
ComputeAPI object only to throw it away and a large number of TCP RST
sent can cause excessive resource consumption.
This moves the creation of the ComputeAPI object from __init__ to being
lazily instantiated upon first use by access of a property, thus
avoiding creation of ComputeAPI objects when we receive TCP RST
messages.
Reviewed: https:/ /review. openstack. org/644998 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=e4fa061f173 53f49615d4850b5 62699d55a0641b
Committed: https:/
Submitter: Zuul
Branch: master
commit e4fa061f17353f4 9615d4850b56269 9d55a0641b
Author: melanie witt <email address hidden>
Date: Wed Mar 20 19:01:33 2019 +0000
Move create of ComputeAPI object in websocketproxy
Currently, we create a compute. rpcapi. ComputeAPI object during questHandler. __init_ _ in order to make calls to nova-compute
NovaProxyRe
for console token authorizations (port validation). This is problematic
in the event that we receive a TCP RST as it results in constructing a
ComputeAPI object only to throw it away and a large number of TCP RST
sent can cause excessive resource consumption.
This moves the creation of the ComputeAPI object from __init__ to being
lazily instantiated upon first use by access of a property, thus
avoiding creation of ComputeAPI objects when we receive TCP RST
messages.
Closes-Bug: #1816727
Change-Id: I3fe5540ea460fb 32767b5e681295f daf89ce17c5