# Artifact not marked as INCONSISTENT if ArtifactRollbackReboot\_Leave fails

**URL:** <https://hub.mender.io/t/artifact-not-marked-as-inconsistent-if-artifactrollbackreboot-leave-fails/5650>\
**Category:** General Discussions\
**Created:** [March 1, 2023, 3:39pm UTC](https://hub.mender.io/t/artifact-not-marked-as-inconsistent-if-artifactrollbackreboot-leave-fails/5650 "2023-03-01T15:39:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![diekleinekuh](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/diekleinekuh/32/1716_2.png) [@diekleinekuh](https://hub.mender.io/u/diekleinekuh)\
**Post date:** [March 1, 2023, 3:39pm UTC](https://hub.mender.io/t/artifact-not-marked-as-inconsistent-if-artifactrollbackreboot-leave-fails/5650/1 "2023-03-01T15:39:17Z")

</div>

Hello,  
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](https://docs.mender.io/artifact-creation/state-scripts#transitions-and-ordering) 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[0000] 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](https://mender.io).

Is this a bug or am I misunderstanding how it is supposed to work?

Thanks!

Best Regards

Markus

---

<div class="post-metadata">

**Author:** ![diekleinekuh](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/diekleinekuh/32/1716_2.png) [@diekleinekuh](https://hub.mender.io/u/diekleinekuh)\
**Post date:** [March 15, 2023, 5:00pm UTC](https://hub.mender.io/t/artifact-not-marked-as-inconsistent-if-artifactrollbackreboot-leave-fails/5650/2 "2023-03-15T17:00:57Z")

</div>

Hey. Sorry for bumping but maybe some kind mender folks could have a look please?
