Document existing orbit auto-uninstall behavior (runs if post-install is supplied and fails, not if install fails) (#25300)

Haven't done full research yet on why this is, but my guess is that if
an install fails we don't know at what stage it failed, so running an
uninstall script would potentially just break things further. Putting
the trigger on post-install means that it's opt-in (we don't populate
post-install scripts by default) and we're uninstalling from a
relatively known state (the installer didn't error).

I'll get an issue filed tomorrow to make sure that this remains the
desired behavior, or if not then when we change this (e.g. when
implementing patching flows), but might as well fix docs in the interim
to be clear about what we're doing.

Co-authored-by: Drew Baker <89049099+Drew-P-drawers@users.noreply.github.com>
This commit is contained in:
Ian Littman 2025-01-10 15:21:05 -06:00 committed by GitHub
parent 2fea291152
commit 9c2d68c41f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,7 +64,7 @@ A post-install script will run after the installation, allowing you to, for exam
### Uninstall script
An uninstall script will run when an admin chooses to uninstall the software from the host on the host details page, or if an install fails for hosts running `fleetd` 1.33.0 or later. Like the install script, a default uninstall script will be pre-filled after selecting a file. This script can be edited if the software package requires a custom uninstallation process.
An uninstall script will run when an admin chooses to uninstall the software from the host on the host details page, or if the post-install script (if supplied) fails for hosts running `fleetd` 1.33.0 or later. Like the install script, a default uninstall script will be pre-filled after selecting a file. This script can be edited if the software package requires a custom uninstallation process.
In addition to the `$INSTALLER_PATH` environment variable supported by install scripts, you can use `$PACKAGE_ID` in uninstall scripts as a placeholder for the package IDs (for .pkg files), package name (for Linux installers), product code (for MSIs), or software name (for EXE installers). The Fleet server will substitute `$PACKAGE_ID` on upload.