Backwards compatibility problem when updating from Mender 4.0 to 5.0

Hello,

We are investigating updating our devices from Mender 4.0 to Mender 5.0. One part of this process is checking if downgrades are possible as we occasionally need to roll back a device to an older version of our software.

While testing this we found the following error:

“Could not fulfill request: Operation not supported: State data has a version which is not supported by this client”

It looks like standalone_data_version is changed in 2c1d92212dcdba383ce0872ad108b3f6cde8c0f9, and versions 4.0.x of Mender do not handle the new data version. This leaves the device in a “confused” state when installing a Mender 4.x over a 5.x, it seems we can’t commit the update (and possibly rollback also doesn’t work well, but I will check that with my colleague who did the test).

This seems to not be mentioned in release notes. But, if I understand right it affects only standalone mode (updates through Mender server should be fine), can you confirm that?

Is there a risk that this will cause problems in rollback of an install of 5.0 back to 4.0?

Is there a way to ensure some level of backwards compatibility? For example introduce a 4.0.x version that can read (but not write) the new format, so we can first update to that and only later to 5.0?

In case this matters: we are using the Yocto layer integration with Yocto kirkstone on custom hardware. We are using both standalone mode and online mode depending on the scenario.

Hi,

Thank you for your question.

I want to clarify that Mender does not officially support downgrading the client or rolling back the client version (e.g., from 5.x to 4.x). This is the reason you’re seeing the Operation not supported: State data has a version which is not supported by this client error as Mender 4.x cannot handle the newer state data format introduced in Mender 5.x.

As you noted, this mainly affects standalone deployments; server-managed updates and rollbacks should continue to work as expected, provided the artifact itself is compatible.

There is no backwards compatibility mechanism (e.g., a 4.x client that can read 5.x state data). We strongly recommend planning upgrades in a forward-only direction. If you need rollback of software versions, this should be handled at the application level rather than via client downgrades.

Kind regards,
Jana