Skip to content

GitOps run fails when moving labels from Global to fleet scope #44950

Description

@ksatter

Fleet versions

  • Discovered: v4.84.2
  • Reproduced:

💥  Actual behavior

After moving labels that previously existed in Fleet as Global labels to workstations.yml, GitOps dry-run succeeded, but the GitOps run failed when applying the config to Fleet with the following error:

[+] applying MDM profiles for fleet Workstations
Error: applying custom settings for fleet "Workstations": POST /api/latest/fleet/mdm/profiles/batch received status 500 converting NULL to uint is unsupported: converting NULL to uint is unsupported (API time: 45ms) 

We also noted that not all labels were present in the Fleet UI.

After removing all references to labels, GitOps ran successfully. In observing the logs, we noted that the operation to move labels from the Global scope to the team scope was occurring after MDM profiles were applied

Awaiting Logs

All labels were also now present in the Fleet UI.

We were then able to re-add all label references for profiles and software to the yaml and apply successfully.

🛠️ Expected behavior

  1. When creating labels in Fleet that have the same name as a label that previously existed on a different scope (e.g. if a global label is deleted and fleet-level label created with the same name), GitOps should handle anything that references those labels by name (e.g. update configuration profiles to reference the new label instead of breaking because the label w/ the referenced name has a different ID).
  2. If fleet-level labels are deleted and re-created under a different fleet, show a clear error message for anything referencing those labels on fleets that don't have access to the label

🧑‍💻  Steps to reproduce

These steps:

  • Have been confirmed to consistently lead to reproduction in multiple Fleet instances.
  • [ x] Describe the workflow that led to the error, but have not yet been reproduced in multiple Fleet instances.
  1. Create labels in the Global scope using GitOps
  2. Add configuration profiles that reference those labels
  3. Move the labels from the Global scope into a team yaml

🕯️ More info (optional)

N/A

Metadata

Metadata

Assignees

Labels

#g-orchestrationOrchestration product groupP1Critical: Broken workflow (critical bug), potential vuln, new feature for immediate Fleet needbugSomething isn't working as documentedcustomer-palmariacustomer-panoramix

Type

No type

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions