]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commit
Use random poll-interval for appInfo on channel reset.
authorOliver Kurth <okurth@vmware.com>
Tue, 21 Apr 2020 21:43:46 +0000 (14:43 -0700)
committerOliver Kurth <okurth@vmware.com>
Tue, 21 Apr 2020 21:43:46 +0000 (14:43 -0700)
commit08218dcd4eb03aafe823ae3585d99a23f7bee3c0
treec25d403988426b30056b2574c28ae17ed9d1b017
parent9b79ed9bc118860518028828a6c7858af62757a8
Use random poll-interval for appInfo on channel reset.

In few workflows like instant clone, when a large number of VMs are
cloned at the same time, if the appinfo plugin runs at the same time
in all the VMs, the underlying ESXi may encounter heavy load.  To
avoid these situations, a random poll interval should be used
for the appinfo whenever applicable workflows are detected.

Detecting a 'rpc channel reset' is a simple approach to detect.

In this changeset, add the following changes:

- Added a new callback function for the 'rpc channel reset'.  If
the rpc channel is reset, a new random poll interval is calculated
and poll timer is adjusted accordingly.  If the existing appinfo
poll interval is greater than the minimum interval of 30 seconds,
random interval will be generated between 30 and appinfopollinterval.
If the existing poll interval is less than the minimum 30 seconds
time, then random interval will not be changed.

- Code refactoring for few functions.
- Changed one global variable as static.
- Added few debug/info log messages.
open-vm-tools/services/plugins/appInfo/appInfo.c