Resolve mixed-fleet rollout issues for package-mode devices

When a fleet template includes an operating system (OS) image target and the fleet contains package-mode devices, those devices show OutOfDate status and rollout batches can stall. You can resolve this by reorganizing fleets, adjusting the fleet template, or moving devices.

Before you begin

  • You have the Flight Control CLI installed and are logged in to the Red Hat Edge Manager service.
  • You have identified package-mode devices showing OutOfDate status in a fleet that includes an OS image target in the device template.

Procedure

Choose one of the following recovery options and complete the associated steps:

Option A: Separate image-mode and package-mode devices into different fleets.

Use this option when you want to apply OS image targets to image-mode devices while managing package-mode devices with a separate fleet template that does not include OS image settings.

  1. Label your devices to distinguish OS modes. For each device, export the current manifest, add a label, and apply the change. In the following example, replace <device_name> with the name of each device:
    flightctl get device/<device_name> -o yaml > device.yaml

    Edit device.yaml to add an osMode label under metadata.labels:

    metadata:
      labels:
        osMode: image

    Set osMode to image for image-mode devices or package for package-mode devices.

    Apply the updated manifest:

    flightctl apply -f device.yaml
  2. Create separate fleets with matching label selectors. The image-mode fleet includes the OS image target in its template. The package-mode fleet template includes only configuration and application workloads.

Option B: Remove the OS image target from the fleet template.

Use this option when OS management is handled per-device or through external tooling, and you want all devices in the fleet to receive only configuration and application specs.

  1. Edit the fleet spec and remove the spec.os.image field from the device template.
  2. Apply the updated fleet spec:
    flightctl apply -f <fleet_spec>.yaml

    Replace <fleet_spec> with the path to your fleet spec file.

Option C: Move package-mode devices out of the fleet.

Use this option when most devices in the fleet are image-mode and you want to keep the OS image target in the fleet template.

  1. Update device labels so that package-mode devices no longer match the fleet selector. Export the device manifest, edit the labels, and apply the change:
    flightctl get device/<device_name> -o yaml > device.yaml

    Edit device.yaml to change or add labels so that the device no longer matches the fleet label selector, then apply:

    flightctl apply -f device.yaml

Results

  • Verify that package-mode devices transition from OutOfDate to UpToDate after the recovery action:
    flightctl get devices --field-selector 'status.capabilities.osMode=package'

    The UPDATED column shows Up-to-date for package-mode devices that are either in a fleet without an OS image target or are individually managed.