fleet icon indicating copy to clipboard operation
fleet copied to clipboard

fleetd installation fails on MacOS if reinstalling/updating it through the host's software UI

Open AndreyKizimenko opened this issue 1 year ago • 14 comments

Fleet version: 4.73

Web browser and operating system: N/A


💥  Actual behavior

For Mac I'm running into a failed installation but the osquery continues to work after the installation fails, which is different from the Linux case described in this bug: https://github.com/fleetdm/fleet/issues/31325.

MacOS error
Installing software...
Failed
installer: Package name is Fleet osquery
installer: Upgrading at base path /
installer: The upgrade failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. An unexpected error occurred while moving files to the final destination.)

🛠️ To fix

TBD - discuss at estimation

Product designer: _________________________

🧑‍💻  Steps to reproduce

  1. Install fleetd on a macOS device.
  2. Upload fleetd package for macos on any team
  3. Try to install/reinstall these packages on the hosts from step 1
  4. Wait for the installation to fail

🕯️ More info (optional)

Linux originally had a similar issue, but osquery would also stop working if an admin attempted to install it via the UI. We addressed it here and as a result uncovered the MacOS case: https://github.com/fleetdm/fleet/issues/31325

AndreyKizimenko avatar Aug 20 '25 16:08 AndreyKizimenko

Hopefully we can utilize similar fix from the Linux issue to add some code to the install scripts in the packages. This is two subtasks, one for each platform.

sgress454 avatar Aug 28 '25 18:08 sgress454

Image

settled on 4

sgress454 avatar Aug 28 '25 18:08 sgress454

@AndreyKizimenko I couldn't replicate this ... maybe I'm not reproducing this correctly? Please refer to the following video (update completes at around the 3:25 mark):

https://github.com/user-attachments/assets/a7068839-8f58-41f3-bf9e-2d22927d6eeb

juan-fdz-hawa avatar Sep 16 '25 22:09 juan-fdz-hawa

@juan-fdz-hawa could you please try re-installing this package on the host that has the same version already installed as the uploaded package?

AndreyKizimenko avatar Sep 17 '25 14:09 AndreyKizimenko

@AndreyKizimenko

https://github.com/user-attachments/assets/63bef817-a2eb-4e25-adec-e37d0026deb4

juan-fdz-hawa avatar Sep 17 '25 16:09 juan-fdz-hawa

@juan-fdz-hawa That's very strange, not something I'm seeing. I think I'll remove the Milestone and assign the ticket to myself to try to reproduce this on other machines and to investigate other potential root causes. It seemed very straightforward initially

AndreyKizimenko avatar Sep 17 '25 17:09 AndreyKizimenko

@juan-fdz-hawa That's very strange, not something I'm seeing. I think I'll remove the Milestone and assign the ticket to myself to try to reproduce this on other machines and to investigate other potential root causes. It seemed very straightforward initially

Thanks, let me know if there's anything I can do to help.

juan-fdz-hawa avatar Sep 17 '25 17:09 juan-fdz-hawa

That's very strange, not something I'm seeing. I think I'll remove the Milestone and assign the ticket to myself to try to reproduce this on other machines and to investigate other potential root causes. It seemed very straightforward initially

@AndreyKizimenko thanks! Because this bug needs repro, I removed this from the drafting board and back into the "Inbox" state: https://fleetdm.com/handbook/company/product-groups#inbox

If you successfully repro, please add it back to the drafting board.

noahtalerman avatar Sep 18 '25 13:09 noahtalerman

Hi @juan-fdz-hawa , so it looks like Windows issue is indeed resolved, I can no longer repro it on any of my devices. I can however repro the macos issue, but that might be for a different reason.

When you upload a macOS fleet client package, it isn't even recognized as installed, maybe because the installed one is different from what we are generating with fleetctl? As a result, any installation fails.

Image

AndreyKizimenko avatar Sep 26 '25 21:09 AndreyKizimenko

Hi @juan-fdz-hawa , so it looks like Windows issue is indeed resolved, I can no longer repro it on any of my devices. I can however repro the macos issue, but that might be for a different reason.

When you upload a macOS fleet client package, it isn't even recognized as installed, maybe because the installed one is different from what we are generating with fleetctl? As a result, any installation fails.

Image

Thanks @AndreyKizimenko - The issue with the fleet-desktop version seems like a software ingestion issue to me, I'm not sure if or how this relates to the other version, so seems like this is reproducible, I'll move it to the drafting board.

juan-fdz-hawa avatar Sep 29 '25 17:09 juan-fdz-hawa

Poker planning

lucasmrod avatar Oct 03 '25 16:10 lucasmrod

Dropping this back out in favor of #33193 because of overlap with #33967.

iansltx avatar Oct 20 '25 22:10 iansltx

Quick update to confirm that I was able to reproduce with these steps:

  • Installed fleetd v1.53.1 on a macOS VM (Workstations fleet).
  • Uploaded fleet-osquery.pkg as a Custom package to the Workstations fleet. (This package contains the same fleetd version as the one that was installed on the VM.)
  • Clicked Install on the host details page > Software > Library tab.
Image Image

nulmete avatar Mar 20 '26 18:03 nulmete

Fleet install fails, Yet osquery prevails, Mac needs softer sails.

fleet-release avatar Apr 25 '26 01:04 fleet-release