fleetdm / fleet

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

[QA Wolf] One of the Mac MDM Hosts on Free Has MDM Turned Off #20040

Open qawolf-fleet opened 2 months ago

qawolf-fleet commented 2 months ago

Fleet version: Fleet 0.0.0-SNAPSHOT-4413a20 • Go go1.19.4 (or newer)

Operating system: Linux 64-bit

Web browser: Google Chrome Version 109.0.5414.119 64-bit


🧑‍💻  Expected behavior

💥  Actual behavior

🐛 on Free

Steps to reproduce:

  1. Run the fleetctl get hosts --mdm > hosts.txt CLI command, ensure we have the --mdm flag
  2. In the results we will see 4 hosts, 2 of these will be the mac ones, specifically, qawolf-free-macos-13 and qawolf-free-macos-14
  3. Grab the UUID of these hosts: qawolf-free-macos-13 has the UUID of 39E36248-C99B-5EB3-9209-C1BEF330C836, while qawolf-free-macos-14 has the UUID of 35AC5C26-3F74-51C1-94C0-8A8B53CB8BEC
  4. Run the command fleetctl mdm run-command --payload /home/wolf/team-storage/list_users.xml --hosts <Insert one of the UUIDs from step 3 here>, the payload path should be the path of our xml file Expected: The command should go through for both the qawolf-free-macos-13 UUID and the qawolf-free-macos-14 UUID Actual: The command only fails with qawolf-free-macos-14's UUID, all the MDM commands work for qawolf-free-macos-13's UUID Note: In my loom I output all the text from stdout into a file so I can view it in browser, from 0:00 seconds to 0:24 in the loom I show the results we got from qawolf-free-macos-13's UUID after running the fleetctl get mdm-command-results --id=7bc19056-ef65-4419-bd94-32aed1d333a0 command, this was successful and we got an Acknowledged status However, when doing the same steps with qawolf-free-macos-14's UUID, I see the error Error: run command request: POST /api/latest/fleet/mdm/commands/run received status 412 Validation Failed: Can't run the MDM command because one or more hosts have MDM turned off. Run the following command to see a list of hosts with MDM on: fleetctl get hosts --mdm. Timestamp: 0:25 Video: https://www.loom.com/share/892c5f2fef7a4329889b0fbca867e715 (https://www.loom.com/share/892c5f2fef7a4329889b0fbca867e715)

Bug report: https://app.qawolf.com/fleet/bug-reports/9ad9aadc-1a18-41b8-a45d-2a448a252a5e

Affected workflows: • Run MDM Command - MacOS - Free - https://app.qawolf.com/fleet/workflows/clxfcbqb102jywotzuhk3z146

If you are aware of this bug you can set the priority to low which will prevent it from causing a run failure.

More info

lukeheath commented 2 months ago

@georgekarrv I'm calling this a released bug. Please change if that's incorrect.