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.
Closes-Bug: #1816727
Change-Id: I3fe5540ea460fb32767b5e681295fdaf89ce17c5
(cherry picked from commit e4fa061f17353f49615d4850b562699d55a0641b)
(cherry picked from commit b1b28169af9f835f5b99a4d70d1c0eff2d9fc2f4)
Reviewed: https:/ /review. openstack. org/649375 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=7766027c890 dc79cc6a5697e18 f719e4fd1c2b35
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 7766027c890dc79 cc6a5697e18f719 e4fd1c2b35
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 9615d4850b56269 9d55a0641b) f5b99a4d70d1c0e ff2d9fc2f4)
(cherry picked from commit e4fa061f17353f4
(cherry picked from commit b1b28169af9f835