fleetdm / fleet

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

Profile removal fails if host never received the profile #21891

Open ddribeiro opened 1 week ago

ddribeiro commented 1 week ago

Fleet version: 4.55.0 and in Dogfood SNAPSHOT-1874915


💥  Actual behavior

When a macOS configuration profile is added to a team and then removed from that team before a host comes online, Fleet will send an MDM command to remove the profile from that host. However, since the profile was never delivered, the removal command fails:

Failed to remove: MDMClientError (89): Profile with identifier '<profile_identifier_here>' not found.

🧑‍💻  Steps to reproduce

  1. With your test host powered off, add a .mobileconfig profile to the team that host belongs to.
  2. Remove the host from the team.
  3. Power your host back on. Go to that host’s details page and click Failed under OS settings. You’ll see that Fleet attempted to send a RemoveProfile MDM command that failed because the profile with that identifier never existed on the host.

🕯️ More info (optional)

JoStableford commented 1 week ago

Related to a Slack conversation