Device details show wrong information for artifacts created or uploaded with old version of mender

Hello all,

when we downgrade our devices to an old artifact, the information shown in the device details gets out-of-sync.

out-of-sync

When I checked wether it shows just the wrong name or even the wrong checksum, I realized the old artifact doesn’t even have a name or checksum.

Details of old artifact:

Details of new artifact:

I didn’t dig particularly deep, but my assumption is the metadata System filesystem and checksum gets created/added only with newer versions of mender. I assume in the device details page, the System software version and checksum gets overwritten with the values of the most recently deployed artifact. If the artifact doesn’t contain these info, the old values are kept instead being deleted.

This is not of upmost importance but nevertheless I wanted you to inform you of this.

Best regards,
Manuel

Hmm, it is supposed to clear that information. What is the version of the Mender client in the old artifact?

Hi @kacf,

the yocto build creating this artifact was using mender-client_2.4.1.bb.

Thanks. I think that the data on the device is correct, this is due to a bug in the reporting. 2.4.x and earlier used an HTTP PATCH endpoint which didn’t support clearing of already existing values. In 2.5.x the client was switched to use a PUT endpoint instead, which supports it.

A very inconvenient, but possible workaround is to decommission the device, and then re-accept it. This should clear the fields in the database, and the next time the client reports, the values should be correct.