We have an artifact that contains a linux system image. In artifact state scripts we install a firmware to a device connected to the linux device that is supposed to match the linux image.
If a rollback happens we reboot the device and this will also reboot the connected device which causes it to revert back to the previous state. In general this works fine.
But if the rollback of the connected device would fail for some reason we wanted the software version on the linux device to show that there is now an inconsistent state. To do this I added a state script for ArtifactRollbackReboot_Leave that returns an error if the firmware version of the connected device is not what’s expected after a rollback.
I can see that the script is working and returns an error. The documentation states that ArtifactRollbackReboot is a state script that ignores errors but should cause an inconsistent artifact name installed if it fails. But for some reason this isn’t working for me. I can see in the logs that the device transitions from ArtifactRollbackReboot into ArtifactFailure state but the installed artifact is not marked as inconsistent.
If I manually do a
mender show-artifact it prints:
WARN Returning artifact name from /etc/mender/artifact_info file. This is a fallback, in case the information can not be retrieved from the database, and is only expected when an update has never been installed before.
This is true since on the device I’m testing on I installed this version manually. But mender has a persistent place to store it’s database and I can also see the deployment logs lying around there.
The version of mender-client used is 3.4.0
We mender backend is https://mender.io.
Is this a bug or am I misunderstanding how it is supposed to work?