balena-cli icon indicating copy to clipboard operation
balena-cli copied to clipboard

`os configure` not allowing configuring with compatible device type fleets

Open majorz opened this issue 1 year ago • 1 comments

Expected Behavior

balena os configure should allow configuring an OS image with a different, but compatible device type (e.g. OS image with raspberrypi4-64 device type and a raspberrypi3 fleet).

This worked on pre-2022 CLI versions.

Actual Behavior

balena os configure only allows configuring an OS image with a fleet of the same device type:

The device type of the provided OS image raspberrypi4-64, does not match the expected device type raspberrypi3

We should rather use balena.models.os.isArchitectureCompatibleWith to check compatibility instead of comparing for exact device type match.

Steps to Reproduce the Problem

  1. Create a Raspberry Pi 3 (32-bit) empty test fleet on the dashboard (e.g. archtest).
  2. Download a Raspberry Pi 4 OS image:
$ balena os download raspberrypi4-64 --version v6.0.10+rev1.prod -o os.img
  1. Configure the OS image:
$ balena os configure os.img --fleet archtest --config-network ethernet
The device type of the provided OS image raspberrypi4-64, does not match the expected device type raspberrypi3

Additional References

The commit that introduce the check seems to be #2556

majorz avatar Aug 23 '24 11:08 majorz

When trying to run balena os configure with an OS image that is of a different device type than the one that's default for the fleet, users are expected to also use the --device-type parameter, eg:

balena os configure ../path/rpi4.img -f MyRpi3Fleet --device-type raspberrypi4-64

thgreasi avatar Aug 23 '24 12:08 thgreasi

I'm closing this for now since for mixed fleets it's expected to also be passing the --device-type parameter`.

thgreasi avatar Sep 02 '25 06:09 thgreasi