Skip to content

GitOps: "503 Service Unavailable" from Apple causes GitOps pipeline to fail #36693

Description

@jakestenger

Fleet version: Self-hosted - will update when known (4.74.0 | Updated to 4.76.1: Issue Persists)

When using Fleet GitOps to manage multiple teams with automatic enrollment profiles, Fleet re-uploads the macOS/iOS Setup Assistant profile to Apple on every GitOps run. If Apple’s DEP endpoint intermittently returns 503 Service Unavailable, Fleet immediately fails the upload and terminates the entire GitOps deployment with a 422 Validation Failed error, even when the profile content has not changed.

This results in unstable GitOps runs that frequently fail due to upstream Apple outages.


💥  Actual behavior

https://fleetdm.unthread.io/dashboard/inbox/me/conversations/a25e1497-1997-47b4-a537-34461d145385

Fleet always attempts to upload the enrollment profile to Apple.
Any upstream Apple DEP 503 causes the upload to fail.
Fleet returns a 422 and terminates the GitOps run.

See Unthread: https://fleetdm.unthread.io/dashboard/inbox/me/conversations/a25e1497-1997-47b4-a537-34461d145385

🛠️ To fix

Fleet server should ignore requests from the client (e.g. GitOps) if the automatic enrollment profile is not changed (same content).

🧑‍💻  Steps to reproduce

*This has not been reproduced by a Fleet team member. These are the customers reproduction steps.

  • Configure multiple teams with enrollment_profiles/automatic defined in GitOps.
  • Run Fleet GitOps sync.
  • Apple’s https://mdmenrollment.apple.com/profile intermittently returns 503.
  • Fleet attempts to POST the profile regardless of whether the GitOps profile content has changed.

🕯️ More info (optional)

Error: uploading macOS setup assistant for team "montamo | macOS": POST /api/latest/fleet/enrollment_profiles/automatic received status 422 Validation Failed: sending profile to Apple failed: Post "https://mdmenrollment.apple.com/profile": DEP auth error: 503 Service Unavailable:

Metadata

Metadata

Labels

#g-apple-at-workProduct group focused on Apple devices:productProduct Design department (shows up on 🦢 Drafting board)P2Urgent: Supported workflow not functioning as intended, newly drafted feature with urgent Fleet needbugSomething isn't working as documentedcustomer-deebradel

Type

No type

Projects

Status
✅ Ready for release

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions