1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

B #-: Monitor CLOSE-WAIT stalled connections (#755)

For vCenter monitor, already added hosts were added again, provoking a
new call to vcenter_connect. This call makes a new vSphere connection
and leaving the previous one hanging. After a timeout, vCenter tried to
close the connection by sending a TCP FIN. OS TCP stack cannot tell
the application (vcenter_monitor) to close, resulting on a CLOSE-WAIT
stalled connections (last forever). This in turn, exhausts the maximum
number of file descriptors opened allowed per process.

Signed-off-by: Ricardo Diaz <rdiaz@opennebula.io>
(cherry picked from commit 8de3e9c87215f5d70bdd80f938b03a038ef6a569)
This commit is contained in:
Ricardo Diaz 2021-02-04 17:32:23 +01:00 committed by Tino Vazquez
parent 2648aa9a5d
commit 1c04ca3c37
No known key found for this signature in database
GPG Key ID: 14201E424D02047E

View File

@ -751,6 +751,8 @@ class ClusterSet
# Add a host by id, it access OpenNebula to get connection parameters
def add(hid, conf)
return if @mutex.synchronize { @clusters.key?(hid) }
begin
cluster = Cluster.new(hid, @client)
error = ''