]> git.ipfire.org Git - thirdparty/open-vm-tools.git/log
thirdparty/open-vm-tools.git
5 years agoMake peeking back into the stack work for back traces
Oliver Kurth [Wed, 10 Jun 2020 19:05:46 +0000 (12:05 -0700)] 
Make peeking back into the stack work for back traces

GCC 10 doesn't like peeking back before the end of an arrary (which
is used to peek into the stack).  Fix this.

https://github.com/vmware/open-vm-tools/issues/429

5 years agoPick up the LSB distro file for ALT Linux
Oliver Kurth [Wed, 10 Jun 2020 19:05:45 +0000 (12:05 -0700)] 
Pick up the LSB distro file for ALT Linux

Improve the documentation of the Linux identification routine so others
know that nothing needs to be changed in the field.
Only VMware needs to add identification codes.

https://github.com/vmware/open-vm-tools/pull/431

5 years agoSDMP plugin logs warning message every 5 minute if there is no
Oliver Kurth [Wed, 10 Jun 2020 19:05:45 +0000 (12:05 -0700)] 
SDMP plugin logs warning message every 5 minute if there is no
Namespace DB instance created on a VM.  Changing the log level to
debug to solve the problem.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 10 Jun 2020 19:05:45 +0000 (12:05 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoClean up lib/file/file.c
Oliver Kurth [Wed, 10 Jun 2020 19:05:45 +0000 (12:05 -0700)] 
Clean up lib/file/file.c

Consistency with the remainder of lib/file.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 10 Jun 2020 19:05:45 +0000 (12:05 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoAdd a new definition for amazonlinux3_64
Oliver Kurth [Wed, 10 Jun 2020 19:05:45 +0000 (12:05 -0700)] 
Add a new definition for amazonlinux3_64

5 years agoImplement Set_option handler in appInfo plugin.
Oliver Kurth [Wed, 10 Jun 2020 19:05:45 +0000 (12:05 -0700)] 
Implement Set_option handler in appInfo plugin.

* Added a handler for the Set_option for appInfo plugin.
  The poll loop will be immediately turned off when the feature
  is turned off at the host side.
  The poll loop will be immediately turned on when the feature
  is turned on at the host side.

* Added the code to handle VM vmotion to an older host that
  doesn't have logic to send 'set_option'.

5 years agoEnable recognition of other5xLinux and other5xLinux64 guests
Oliver Kurth [Wed, 10 Jun 2020 19:05:45 +0000 (12:05 -0700)] 
Enable recognition of other5xLinux and other5xLinux64 guests

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 10 Jun 2020 19:05:45 +0000 (12:05 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoDirective argument is null from GCC 9.3.0
Oliver Kurth [Wed, 10 Jun 2020 19:05:44 +0000 (12:05 -0700)] 
Directive argument is null from GCC 9.3.0

There are paths that do not properly deal with NULL in FileMakeTempEx2Work.
Fix this.

https://github.com/vmware/open-vm-tools/issues/428

5 years agoAdd new definition for rhel9_64 and clones.
Oliver Kurth [Wed, 10 Jun 2020 19:05:44 +0000 (12:05 -0700)] 
Add new definition for rhel9_64 and clones.

5 years agoAdd recognition of FreeBSD 13.
Oliver Kurth [Wed, 10 Jun 2020 19:05:44 +0000 (12:05 -0700)] 
Add recognition of FreeBSD 13.

5 years agoEnable recognition of SLES 16_64.
Oliver Kurth [Wed, 10 Jun 2020 19:05:44 +0000 (12:05 -0700)] 
Enable recognition of SLES 16_64.

5 years agoAdd recognition of Windows Server 2021.
Oliver Kurth [Wed, 10 Jun 2020 19:05:44 +0000 (12:05 -0700)] 
Add recognition of Windows Server 2021.

5 years agoEnable recognition of darwin20_64 (macOS 10.16) and darwin21_64 (macOS 10.17).
Oliver Kurth [Wed, 10 Jun 2020 19:05:44 +0000 (12:05 -0700)] 
Enable recognition of darwin20_64 (macOS 10.16) and darwin21_64 (macOS 10.17).

5 years agoguest_os_tables.h: Backout previous change for SLES-16.
Oliver Kurth [Wed, 10 Jun 2020 19:05:44 +0000 (12:05 -0700)] 
guest_os_tables.h: Backout previous change for SLES-16.

5 years agoEnable recognization of SLES 16.
Oliver Kurth [Wed, 10 Jun 2020 19:05:44 +0000 (12:05 -0700)] 
Enable recognization of SLES 16.

5 years agoMove appInfo and serviceDiscovery plugin related header files.
Oliver Kurth [Wed, 10 Jun 2020 19:05:44 +0000 (12:05 -0700)] 
Move appInfo and serviceDiscovery plugin related header files.

As part of an upcoming project, some appinfo and serviceDiscovery
header files are needed at a different location in the common source
tree.

* Moved the appInfo.h and serviceDiscovery.h to a different location.

* Made necessary code and OVT changes to refer to new file paths.

* Did some cleanup related to the MACRO names for the keys and scripts.

5 years agoFix a Coverity-reported NULL pointer issue.
Oliver Kurth [Wed, 10 Jun 2020 19:05:44 +0000 (12:05 -0700)] 
Fix a Coverity-reported NULL pointer issue.

Check whether a pointer is NULL before dereferencing it.  Also
updated a stale comment, edited a couple of other comments for
line length, and deleted some trailing white space.

5 years agoFix dereference after null check reported by Coverity.
Oliver Kurth [Wed, 10 Jun 2020 19:05:43 +0000 (12:05 -0700)] 
Fix dereference after null check reported by Coverity.

Remove a superfluous NULL pointer test that causes Coverity
to report a dereference after null check.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 10 Jun 2020 19:05:43 +0000 (12:05 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoEnable recognition of Amazone Linux 3.
Oliver Kurth [Wed, 10 Jun 2020 19:05:43 +0000 (12:05 -0700)] 
Enable recognition of Amazone Linux 3.

5 years agoHeader file vm_verison.h not needed in lib/user/util.c.
Oliver Kurth [Wed, 10 Jun 2020 19:05:43 +0000 (12:05 -0700)] 
Header file vm_verison.h not needed in lib/user/util.c.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Wed, 10 Jun 2020 19:05:43 +0000 (12:05 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon source file change not directly applicable to open-vm-tools.
Oliver Kurth [Wed, 10 Jun 2020 19:05:43 +0000 (12:05 -0700)] 
Common source file change not directly applicable to open-vm-tools.

5 years agoCoverity reported issue: missing break
Oliver Kurth [Wed, 10 Jun 2020 19:05:43 +0000 (12:05 -0700)] 
Coverity reported issue: missing break

Add the missing break.

5 years agoChanges to common source file not applicable to open-vm-tools.
Oliver Kurth [Wed, 10 Jun 2020 19:05:43 +0000 (12:05 -0700)] 
Changes to common source file not applicable to open-vm-tools.

5 years agoCommon source file change not directly applicable to open-vm-tools.
Oliver Kurth [Wed, 10 Jun 2020 19:05:42 +0000 (12:05 -0700)] 
Common source file change not directly applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:59 +0000 (15:32 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:59 +0000 (15:32 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoserviceDiscovery: Updating 'get-versions.sh' script
Oliver Kurth [Tue, 26 May 2020 22:32:58 +0000 (15:32 -0700)] 
serviceDiscovery: Updating 'get-versions.sh' script

The following changes have been made:

1. Environment variable 'ALIVE_BASE' is used to construct the path of
   the file where vcops version is stored.  The variable is not avialable
   when running the script inside serviceDiscovery plugin process, so a
   hardcoded path is used.

2. Added command to retrieve tcserver version

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:58 +0000 (15:32 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoDeprecate VMGuestLib_GetHostMemKernOvhdMB GuestSDK API.
Oliver Kurth [Tue, 26 May 2020 22:32:58 +0000 (15:32 -0700)] 
Deprecate VMGuestLib_GetHostMemKernOvhdMB GuestSDK API.

* GUESTLIB_HOST_MEM_KERN_OVHD_MB metric was already deprecated in ESXi
  starting from 7.1.  It's time to deprecate the corresponding
  VMGuestLib_GetHostMemKernOvhdMB API in GuestSDK.  The documentation
  will be update denoting that this API is deprecated.
  After one or two releases, the API will be removed completely.
  Untill then, the API is modified to explicity return 0 for the metric.

* Only a few functions listed in vmGuestLib.h are exposed in the vmGuestLibJava
  interface.  The remaining functions are encapsulated in '#ifndef SWIG'
  to hide them from SWIG utility which is used to generate the Java bindings.

Note: The external customer facing documentation for this API will be
      documented later.
Note: Once this changeset is submitted, the vmStatsProvider module
      will be updated to stop using the deprecated API.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:58 +0000 (15:32 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoChanges to common source files not applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:58 +0000 (15:32 -0700)] 
Changes to common source files not applicable to open-vm-tools.

5 years agoUpdate to bora/public/vm_tools_version.h
Oliver Kurth [Tue, 26 May 2020 22:32:58 +0000 (15:32 -0700)] 
Update to bora/public/vm_tools_version.h

Add tools versions 11.1.1 and 11.1.5 to bora/public/vm_tools_version.h

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:58 +0000 (15:32 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoChanges to common source files not applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:58 +0000 (15:32 -0700)] 
Changes to common source files not applicable to open-vm-tools.

5 years agoBackout previous changes to common source files.
Oliver Kurth [Tue, 26 May 2020 22:32:58 +0000 (15:32 -0700)] 
Backout previous changes to common source files.

5 years agoChanges to common source files not applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:58 +0000 (15:32 -0700)] 
Changes to common source files not applicable to open-vm-tools.

5 years agoCommon source file changes not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:57 +0000 (15:32 -0700)] 
Common source file changes not directly applicable to open-vm-tools.

5 years agoCommon source file changes not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:57 +0000 (15:32 -0700)] 
Common source file changes not directly applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:57 +0000 (15:32 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoBackout previous common header file change - not applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:57 +0000 (15:32 -0700)] 
Backout previous common header file change - not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:57 +0000 (15:32 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoUpdating the bora/public/vm_tools_version.h history.
Oliver Kurth [Tue, 26 May 2020 22:32:57 +0000 (15:32 -0700)] 
Updating the bora/public/vm_tools_version.h history.

Tracking version info for the 10.3.22 patch release and 10.2.23
development version of tools for older Linux guests.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:57 +0000 (15:32 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon source file changes not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:57 +0000 (15:32 -0700)] 
Common source file changes not directly applicable to open-vm-tools.

5 years agoCommon source file changes not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:57 +0000 (15:32 -0700)] 
Common source file changes not directly applicable to open-vm-tools.

Pre-enable SUSE 16

5 years agoCommon source file changes not directly applicable to open-vm-tools
Oliver Kurth [Tue, 26 May 2020 22:32:57 +0000 (15:32 -0700)] 
Common source file changes not directly applicable to open-vm-tools

Pre-enable RHEL 9, CentOS 9, Oracle 9, and Asianux 9 guests

5 years agoGuestSDK and vmtoolslib cleanup.
Oliver Kurth [Tue, 26 May 2020 22:32:56 +0000 (15:32 -0700)] 
GuestSDK and vmtoolslib cleanup.

* Removed the vmtools dependency for guestsdk.  This has been already
  done for tar tools build/target.  The same is being done for OVT
  builds.

* Used various static libraries for building guestlib in OVT instead of
  depending on vmtoolslib.  Similar thing has already been done for
  appmonitor library in OVT.

* GuestSDK_{Panic|Debug|Warning|Log} functions in vmtoolslib are not used
  anywhere and hence they are completely removed from the code.

5 years agoCommon header file change not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:56 +0000 (15:32 -0700)] 
Common header file change not directly applicable to open-vm-tools.

5 years agoChanges to common header files not applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:56 +0000 (15:32 -0700)] 
Changes to common header files not applicable to open-vm-tools.

5 years agoPre-enablment: Recognition of FreeBSD 13
Oliver Kurth [Tue, 26 May 2020 22:32:56 +0000 (15:32 -0700)] 
Pre-enablment: Recognition of FreeBSD 13

5 years agoImprove logging on signature verification
Oliver Kurth [Tue, 26 May 2020 22:32:56 +0000 (15:32 -0700)] 
Improve logging on signature verification

If xmlsec and vgauth are built inconsistently, xmlSecSize
can differ between the two, which results in a key datastructure
being a different size, and vgauth ends up looking in the
wrong place in memory for the signature check status.

Log the status, so that if its not one of the two
expected values, we have some ideas of what went wrong.

5 years agoChanges to common header files not directly related to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:56 +0000 (15:32 -0700)] 
Changes to common header files not directly related to open-vm-tools.

Recongition of MacOS 10.17 (darwin21-64) - pre-enablement on hosts.

5 years agolib/file: Fix a memory leak in FileLock_Lock.
Oliver Kurth [Tue, 26 May 2020 22:32:56 +0000 (15:32 -0700)] 
lib/file: Fix a memory leak in FileLock_Lock.

Valgrind complained about a minor leak within FileLock_Lock when running
test-vmx Firmware.Efi.QuickBoot .  FileLockScanner builds a list of "active
locks" and traverses that list repeatedly, but whenever it decides to remove
an entry from the list, it would simply leak it.

This change ensures that the list item is not leaked by Posix_Free()ing it
once it is no longer needed.

5 years agoHgfs Linux/OSX Server: fix write-only shares access check creating new files
Oliver Kurth [Tue, 26 May 2020 22:32:56 +0000 (15:32 -0700)] 
Hgfs Linux/OSX Server: fix write-only shares access check creating new files

Linux and OS X Hgfs server has an incorrect failure status check when a
user has a write-only share enabled.  In a write-only share any failure
is mapped to EACESS unless the error is ENOENT when a new file is to be
created.  The error check currently fails all errors when it should
only allow creation of new files i.e., ENOENT with flags specifying
O_CREAT.

The check should be
   if (status == EACCES) goto exit

5 years agoCommon source file changes not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:56 +0000 (15:32 -0700)] 
Common source file changes not directly applicable to open-vm-tools.

5 years agoCommon source file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:55 +0000 (15:32 -0700)] 
Common source file change not applicable to open-vm-tools.

5 years agoCommon source file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:55 +0000 (15:32 -0700)] 
Common source file change not applicable to open-vm-tools.

5 years agoChanges to common source files not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 26 May 2020 22:32:55 +0000 (15:32 -0700)] 
Changes to common source files not directly applicable to open-vm-tools.

5 years agoMerge branch 'stable-11.1.x'
Oliver Kurth [Fri, 8 May 2020 20:32:13 +0000 (13:32 -0700)] 
Merge branch 'stable-11.1.x'

5 years agoUpdate README.md stable-11.1.0
Oliver Kurth [Fri, 8 May 2020 20:11:52 +0000 (13:11 -0700)] 
Update README.md

space after #

5 years agoadd compatibility and languages
Oliver Kurth [Fri, 8 May 2020 20:09:10 +0000 (13:09 -0700)] 
add compatibility and languages

5 years agorelease notes for 11.1.0
Oliver Kurth [Fri, 8 May 2020 19:08:04 +0000 (12:08 -0700)] 
release notes for 11.1.0

5 years agodocument new sdmp plugin
Oliver Kurth [Fri, 8 May 2020 19:02:24 +0000 (12:02 -0700)] 
document new sdmp plugin

5 years agoupdate build number
Oliver Kurth [Wed, 6 May 2020 17:08:04 +0000 (10:08 -0700)] 
update build number

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Mon, 4 May 2020 18:54:13 +0000 (11:54 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years ago[AppInfo] Tweak the gather loop only for a real config reload.
Oliver Kurth [Mon, 4 May 2020 18:54:13 +0000 (11:54 -0700)] 
[AppInfo] Tweak the gather loop only for a real config reload.

The poll loop for the appInfo is being tweaked (destroyed and recreated)
for every conf reload even when nothing related to appinfo changed.
This may cause few scenarios where the 'application information'
will never be collected inside the guest.  Fixed the code, to
tweak the loop only when there is a real appinfo related config change
in the tools.conf file.

5 years agoUse RPCI_UNKNOWN_COMMAND macro instead of hardcoded 'Unknown command" string.
Oliver Kurth [Mon, 4 May 2020 18:54:13 +0000 (11:54 -0700)] 
Use RPCI_UNKNOWN_COMMAND macro instead of hardcoded 'Unknown command" string.

At few places in the code, the result from the RPC channel send APIs
is explicitly compared with a harcoded "Unknown command" string.  We already
have a well defined macro for that.  Changed the code to re-use the macro
wherever possible.

5 years agoClean up a few things in the random.h header file.
Oliver Kurth [Mon, 4 May 2020 18:54:12 +0000 (11:54 -0700)] 
Clean up a few things in the random.h header file.

5 years agoFix minor misc. issues.
Oliver Kurth [Mon, 4 May 2020 18:54:12 +0000 (11:54 -0700)] 
Fix minor misc. issues.

* In ServiceLoadFileContentsPosix() function, fd is always a positive
  value when close() is called.  The if check 'fd >= 0' is not really
  required.  Removed it.

* Fixed the function name in the "procedure comment block" for the
  ParseShareName function.

5 years agoFix minor 'Comparison is always true' warning in linuxDeployment.c
Oliver Kurth [Mon, 4 May 2020 18:54:12 +0000 (11:54 -0700)] 
Fix minor 'Comparison is always true' warning in linuxDeployment.c

pkgProcessTimeout is uint16 and comparison is always true because
pkgProcessTimeout <= 65535, so remove the check.

5 years agoDeprecate GUESTLIB_HOST_MEM_KERN_OVHD_MB at ESXi level.
Oliver Kurth [Mon, 4 May 2020 18:54:12 +0000 (11:54 -0700)] 
Deprecate GUESTLIB_HOST_MEM_KERN_OVHD_MB at ESXi level.

Decided to deprecate GUESTLIB_HOST_MEM_KERN_OVHD_MB.  This changeset
implements the necessary changes to deprecate the metric at the ESXi level.

Will address the deprecation changes in GuestLib SDK/API in
a separate changeset.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Mon, 4 May 2020 18:54:12 +0000 (11:54 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoBackout previous change to guestlibV3.x
Oliver Kurth [Mon, 4 May 2020 18:54:12 +0000 (11:54 -0700)] 
Backout previous change to guestlibV3.x

5 years agoDeprecate GUESTLIB_HOST_MEM_KERN_OVHD_MB at ESXi level.
Oliver Kurth [Mon, 4 May 2020 18:54:12 +0000 (11:54 -0700)] 
Deprecate GUESTLIB_HOST_MEM_KERN_OVHD_MB at ESXi level.

Decided to deprecate GUESTLIB_HOST_MEM_KERN_OVHD_MB. This changeset
implements the necessary changes to deprecate the metric at the ESXi level.

Will address the deprecation changes in GuestLib SDK/API in
a separate changeset.

5 years agoCommon source file change not applicable to open-vm-tools.
Oliver Kurth [Mon, 4 May 2020 18:54:12 +0000 (11:54 -0700)] 
Common source file change not applicable to open-vm-tools.

5 years agoDefine macro for "Permission Denied" message returned from RpcChannel send APIs.
Oliver Kurth [Mon, 4 May 2020 18:54:12 +0000 (11:54 -0700)] 
Define macro for "Permission Denied" message returned from RpcChannel send APIs.

In error cases, RpcChannel Send APIs (RpcChannel_SendOneRaw,
RpcChannel_SendOneRawPriv return 'hard coded' "Permission Denied"
error message.

This changeset adds the MACRO for that error message.

If there are any callers who compare the results (ex: ServiceDiscovery), they
don't have to use 'hardcoded' messages and can reuse the MACROs.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Mon, 4 May 2020 18:54:12 +0000 (11:54 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCodeSet: Fix copyright header in codeset.h
Oliver Kurth [Mon, 4 May 2020 18:54:11 +0000 (11:54 -0700)] 
CodeSet: Fix copyright header in codeset.h

5 years agoCodeSet: Add CodeSet_IsValidUTF8String() and more comments
Oliver Kurth [Mon, 4 May 2020 18:54:11 +0000 (11:54 -0700)] 
CodeSet: Add CodeSet_IsValidUTF8String() and more comments

This change adds a new function CodeSet_IsValidUTF8String() to
lib/misc/codesetUTF8.c, and adds comments for CodeSet_IsValidUTF8()
and CodeSet_IsStringValidUTF8().

5 years agoServiceDiscovery: Deleting keys from NDB by chunks to reduce RPC calls.
Oliver Kurth [Mon, 4 May 2020 18:54:11 +0000 (11:54 -0700)] 
ServiceDiscovery: Deleting keys from NDB by chunks to reduce RPC calls.

Setting chunk size to 25 keys at a time.

5 years agoUse random poll-interval for appInfo on channel reset.
Oliver Kurth [Tue, 21 Apr 2020 21:52:11 +0000 (14:52 -0700)] 
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.

5 years agoAppInfo updates.
Oliver Kurth [Tue, 21 Apr 2020 21:52:11 +0000 (14:52 -0700)] 
AppInfo updates.

While most of the changes are only applicable to VMware Tools for Windows
and are not applicable to open-vm-tools, the following changes do apply.

- Modified few log messages from g_debug from g_warning.
- Modified the default poll interval to 360 minutes (Once in six hours).
- Modified log messages to log the filepath whose version is being retrieved.

5 years agoMake Backdoor fallback temporary.
Oliver Kurth [Tue, 21 Apr 2020 21:52:10 +0000 (14:52 -0700)] 
Make Backdoor fallback temporary.

When RpcOut falls to Backdoor, it stays with Backdoor
permanently for the life of vmtoolsd service.  It is a
long standing bug in the reset handling code.  Typically,
channel type is not changed during reset.  Our reset
handling code can either keep the channel type same or
switch it from vsocket to Backdoor, but it can't do other
way.  Though it is supposed to switch to vsocket on reset
caused by events like vmtoolsd being restarted or VMX
breaking the channel for some VM management operation.
With this change when we start the channel, we always
try vsocket first unless Backdoor is enforced by the
caller.

Using Backdoor for too long is not desirable because
privileged RPCs can't be used on such channel.  So, we
need to retry switching the channel back to vsocket
periodically.  We don't want to try vsocket on every
RpcChannel_Send call because that adds to overhead and
increases the latency of RpcChannel_Send due to connection
timeouts.  So, we retry vsocket with a backoff delay
between 2sec-5min.

As some RpcChannel callers intend to use Backdoor channel
we need to differentiate between such usage from the
callers that create vsocket channel and fallback to
Backdoor.  Therefore, introduced a concept of mutable
channel.  The vsocket channel is mutable as it can fallback
to Backdoor and restore vsocket.  However, if a caller
creates Backdoor channel, it will not be mutable and
stay with Backdoor for its lifetime.

As vmxLogger frequently connects and disconnects the
channel for every log message and does not use any
privileged RPC, so make it use Backdoor channel
permanently to avoid frequent vsocket connections.

Additionally, removed the redundant 'stopRpcOut' interface
and renamed 'onStartErr' to 'destroy'.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 21 Apr 2020 21:43:46 +0000 (14:43 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 21 Apr 2020 21:43:46 +0000 (14:43 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoFix a trivial typo in the VIX log message.
Oliver Kurth [Tue, 21 Apr 2020 21:43:46 +0000 (14:43 -0700)] 
Fix a trivial typo in the VIX log message.

* Fixed a trivial typo in the VIX log message.
* Fixed an indentation issue.

5 years agoUse random poll-interval for appInfo on channel reset.
Oliver Kurth [Tue, 21 Apr 2020 21:43:46 +0000 (14:43 -0700)] 
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.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 21 Apr 2020 21:43:46 +0000 (14:43 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 21 Apr 2020 21:43:46 +0000 (14:43 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoCommon header file change not applicable to open-vm-tools.
Oliver Kurth [Tue, 21 Apr 2020 21:43:46 +0000 (14:43 -0700)] 
Common header file change not applicable to open-vm-tools.

5 years agoFree old ununsed loggers when tools.conf changes.
Oliver Kurth [Tue, 21 Apr 2020 21:43:46 +0000 (14:43 -0700)] 
Free old ununsed loggers when tools.conf changes.

Existing unused loggers are leaked when there is a change
in logging configuration.  Added a check to free the loggers
that are not used after tools.conf is modified.

5 years agoChanges to common source files not directly applicable to open-vm-tools.
Oliver Kurth [Tue, 21 Apr 2020 21:43:46 +0000 (14:43 -0700)] 
Changes to common source files not directly applicable to open-vm-tools.

5 years agoAdd option to vmware-vgauth-cmd to support remove alias by [username]
Oliver Kurth [Tue, 21 Apr 2020 21:43:46 +0000 (14:43 -0700)] 
Add option to vmware-vgauth-cmd to support remove alias by [username]
and subject

a. subject is mandatory
b. if user only provide subject, will only remove subject matched mapped aliases
c. if user provide username and subject, remove matched aliases

5 years agoMake Backdoor fallback temporary.
Oliver Kurth [Tue, 21 Apr 2020 21:43:46 +0000 (14:43 -0700)] 
Make Backdoor fallback temporary.

When RpcOut falls to Backdoor, it stays with Backdoor
permanently for the life of vmtoolsd service.  It is a
long standing bug in the reset handling code.  Typically,
channel type is not changed during reset.  Our reset
handling code can either keep the channel type same or
switch it from vsocket to Backdoor, but it can't do other
way.  Though it is supposed to switch to vsocket on reset
caused by events like vmtoolsd being restarted or VMX
breaking the channel for some VM management operation.
With this change when we start the channel, we always
try vsocket first unless Backdoor is enforced by the
caller.

Using Backdoor for too long is not desirable because
privileged RPCs can't be used on such channel.  So, we
need to retry switching the channel back to vsocket
periodically.  We don't want to try vsocket on every
RpcChannel_Send call because that adds to overhead and
increases the latency of RpcChannel_Send due to connection
timeouts.  So, we retry vsocket with a backoff delay
between 2sec-5min.

As some RpcChannel callers intend to use Backdoor channel
we need to differentiate between such usage from the
callers that create vsocket channel and fallback to
Backdoor.  Therefore, introduced a concept of mutable
channel.  The vsocket channel is mutable as it can fallback
to Backdoor and restore vsocket.  However, if a caller
creates Backdoor channel, it will not be mutable and
stay with Backdoor for its lifetime.

As vmxLogger frequently connects and disconnects the
channel for every log message and does not use any
privileged RPC, so make it use Backdoor channel
permanently to avoid frequent vsocket connections.

Additionally, removed the redundant 'stopRpcOut' interface
and renamed 'onStartErr' to 'destroy'.

5 years agoAppInfo updates.
Oliver Kurth [Tue, 21 Apr 2020 21:43:45 +0000 (14:43 -0700)] 
AppInfo updates.

While most of the changes are only applicable to VMware Tools for Windows
and are not applicable to open-vm-tools, the following changes do apply.

- Modified few log messages from g_debug from g_warning.
- Modified the default poll interval to 360 minutes (Once in six hours).
- Modified log messages to log the filepath whose version is being retrieved.