client: broken Artifacts created from snapshot

Description

Circumstances still under investigation.

Some times the Artifact created via snapshot is unusable as it will result in a failed update.

Relevant logs from the server side:

From the serial console, it can be seen that the device reboots twice: once into the target partition and then rollback into the original partition.

Creating a new Artifact with from the same snapshot command resulted in a successful deployment.

Affects versions

None

Environment

None

Attachments

2

Checklist

Activity

Show:

Lluis CamposSeptember 27, 2021 at 9:01 AM

In effect, this fix made mender-artifact incompatible with Mac OS. See related bug

Lluis CamposJanuary 19, 2021 at 4:09 PM

Lluis CamposJanuary 18, 2021 at 1:23 PM

After experimenting a bit more, I have verified that touching a dummy file in the "broken" Artifact (in effect, triggering a fsck on the filesystem image) fixes the issue. I have been able to reliably reproduce the issue and the fix.

Great hunch !

PR here: https://github.com/mendersoftware/mender-artifact/pull/324

Kristian AmlieJanuary 15, 2021 at 2:52 PM

I believe it is because the boot loader rolls back, not Mender. Consider this state flow:

For a "normal" rollback it would be:

So it is behaving correctly (well, expected at least) in that regard. The question is what happens between reboot number one and two?

Lluis CamposJanuary 15, 2021 at 2:39 PM

Attached the full logs from the Mender server and the serial console.

By looking closer to the serial console log I can see:

  • Mender running in partition /dev/mmcblk0p3, installing artifact in /dev/mmcblk0p2

  • Download complete

  • Boot into /dev/mmcblk0p2

  • Reboot (rollback?)

  • Boot into /dev/mmcblk0p3

  • Rebot again (why?)

  • Boot into /dev/mmcblk0p3

  • Report deployment failure to server

Fixed

Details

Assignee

Reporter

Labels

Priority

Days in progress

0

Fix versions

Sprint

Backlog

yes

Zendesk Support

Checklist

Created January 15, 2021 at 2:07 PM
Updated June 25, 2024 at 12:02 PM
Resolved January 18, 2021 at 8:47 PM