]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Service Discovery data collection duration takes > 70 minutes when
authorKruti <kpendharkar@vmware.com>
Fri, 3 May 2024 16:05:45 +0000 (09:05 -0700)
committerKruti <kpendharkar@vmware.com>
Fri, 3 May 2024 16:05:45 +0000 (09:05 -0700)
monitoring large setups.

The issue happens on vrops node VMs that are part of large clusters
because these kind of nodes typically have a large amount of tcp/udp
connections.  The root cause of the issue is an enormous number of
spaces generated by "ss -antup | grep -E $pattern" command in
get-connection-info.sh. The SDMP plugin considers these spaces while
calculating the chunk size for writing into NDB and writing about 200-400
chunks for the get-connection-info key.  Processing of this amount of
data slows down the discovery process on both the adapter and plugin sides
and, as a result, the discovery exceeds the timing limit and fails.

The solution is to remove unnecessary spaces from the end of the
get-connection-info output lines.

open-vm-tools/services/plugins/serviceDiscovery/get-connection-info.sh

index 5b49442e64ad79351ca4814ff587d9fb786d8f6d..804f651eec0863159dd31f828a26d2ded270768f 100644 (file)
@@ -15,4 +15,4 @@ space_separated_pids=$(ss -lntup | grep -Eo "pid=[0-9]+" | sort -u)
 pattern=$(echo $space_separated_pids | tr ' ' '|')
 
 # get matching lines
-ss -antup | grep -E $pattern
+ss -antup | grep -E $pattern  | sed 's/[ \t]*$//'