Bug 246440 - emulators/open-vm-tools Removal of the open-vm-tools package must notify the host that OVT is no longer installed
Summary: emulators/open-vm-tools Removal of the open-vm-tools package must notify the ...
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Josh Paetzel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-13 15:15 UTC by John Wolfe
Modified: 2020-05-14 14:52 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (jpaetzel)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Wolfe 2020-05-13 15:15:59 UTC

    
Comment 1 John Wolfe 2020-05-13 15:24:28 UTC
Revision  473439 that deleted the pre-uninstall stopping of the service also deleted the notification to the host of the removal of tools.  This can certainly confuse user of the vCenter console as tools status will show "installed" but "not-running".  

Please consider replacing at least this portion of the "preunexec" directive.

@preunexec %%PREFIX%%/bin/vmware-rpctool 'tools.set.version 0' || /usr/bin/true
Comment 2 Josh Paetzel freebsd_committer 2020-05-14 14:27:09 UTC
Would anything need to get set when the tools are installed?
eg: is there a @postexec that would improve the user experience?
Comment 3 John Wolfe 2020-05-14 14:52:31 UTC
There is nothing needed when the tools are installed.

When vmtoolsd begins one of the first handshakes with the host (VMX) is a "tools.set.version nnnnn" indicating the tools version running.

The separate "tools.set.version 0" indicates denotes the is being removed.  It signals that vmtoolsd is being intentionally stop and the host should not consider the lack of contact with the guest as an indication that the guest has become unresponsive.    We do not want HA configured VMs mistakenly rebooted.

As far as @postexec:
 
I believe we both agree that there is no harm in (re)starting
the service.   I reasonably responsible person would not elect to install open-vm-tools on a guest not running on a VMware hypervisor be it ESXi, WorkStation or Fusion.  Even if that happens, the service detects that it is not on a VMware hypervisor and self-terminates.

I believe that most if not all Linux OS releases come with open-vm-tools already installed in the base OS.