Closed getvictor closed 1 month ago
I've started QAing this issue.
Tried uninstalling Tailscale on a Windows 10 and 11 VMs (VMWare), I got the following error in the uninstall script output:
Start-Process : This command cannot be run due to the error: The system cannot find the file specified.
At C:\Windows\TEMP\fleet-436bbb32-ce1b-49f5-b75d-d2e047cc63f9-236699952\script.ps1:46 char:20
+ $process = Start-Process @processOptions
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
Uninstall exit code:
@lucasmrod Yes, I'm aware of this issue. Fixing as part of #20000 -- currently EXE flow is buggy.
I tried installing+uninstalling a Firefox MSI (downloaded from here) and I got the following error on uninstall, let me know if it's expected/known:
This action is only valid for products that are currently installed
Am trying to get a successful uninstall before proceeding to test the edge case here. Am happy to skip the happy path if we know about these issues.
For the specific EXE fail, fix is here: https://github.com/fleetdm/fleet/pull/22164
The MSI uninstall issue is new.
QA Update:
I was able to verify the fix for macOS. Installing Microsoft Teams pkg (with a exit 1
post install script) does effectively run the uninstaller script. (I had to build fleetd from main
of course).
Am having some trouble with install scripts that have !#/bin/sh
on Linux, most likely a bug but not related to this issue.
So, TODO are Linux and Windows.
QA Update:
I was able to verify Windows using 7-zip's MSI installer. (Exit 1
on the post install script and adding Write-Host "Hello"
to the uninstall script).
TODO: Linux (I'm having issues with the new lines, it might be a bug on my VM, investigating...)
QA Update:
Installing Firefox deb with a post-install script with exit 1
. I get the following output:
Post-install script output:
Running script...
Exit code: 1 (Failed)
Hello
Attempting rollback by running uninstall script...
Uninstall script exit code: 100
/tmp/2512911600/rollback-script.sh: 2:
: not found
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package firefox
I also got the following error while trying to install again:
(I didn't change the package itself, and it installed successfully in previous attempts...)
I finally was able to root cause the issue for Ubuntu packages: https://github.com/fleetdm/fleet/issues/22196
Uninstall script glows, In clouds, a gentle safety, Docs reflect the change.
When postInstall script fails, fleetd should run the user-visible uninstall script instead of the secret remove script.
Also need to update the docs regarding this behavior.
Demo
[Demo] Uninstall script runs after failed post-install script - Watch Video