fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
2.67k stars 379 forks source link

Can't install software via self service after device that previously installed the software has been wiped #20131

Open ddribeiro opened 6 days ago

ddribeiro commented 6 days ago

Fleet version: 4.53.0


💥  Actual behavior

Software that has been installed by Fleet via self service does not appear to reset its state after a device is re-enrolled. This creates a scenario where:

  1. A device is enrolled in Fleet and the user installs software via Fleet self service. Fleet shows the software is installed in the UI as expected.
  2. The device is erased and then enrolled back into Fleet.
  3. The user attempts to install the software that was previously installed before the device was erased via Fleet self service. The Fleet UI shows the software is "Installed" and does not allow the user to install it again. This is true even after refetching device vitals to populate the list of installed software.

Screenshot 2024-07-01 at 11 34 09 AM

🧑‍💻  Steps to reproduce

  1. In Fleet, upload a software installer to a team that your test computer is enrolled in. Make it available for a self service install.
  2. Install the software on your test computer via the self service workflow.
  3. Erase the device (doesn't seem to matter if this is done manually or with an MDM command) but keep the host record in Fleet.
  4. Re-enroll the device in Fleet. Fleet should match up the new enrollment with the existing device record.
  5. Attempt to install same software you did in step 2. Fleet will not allow this because the software has already been installed.
JoStableford commented 6 days ago

Related to a Slack conversation

PezHub commented 5 days ago

QA Notes:

thanks for the detailed steps @ddribeiro !

I was able to reproduce with any pkg that was previously installed on the device via Self Service or not. The history remains and shows as installed preventing a proper re-install.