Make sure that rootfs artifact payload has same checksum as sdimg partition

Description

This is important for delta updates to work. Most likely this can be solved by having wic take the image as input instead of the rootfs folder

Acceptance criteria:

  • Rootfs artifact payload must have same checksum as sdimg rootfs partition

    • If the partition is slightly larger than the artifact, then the only the size from the artifact should be checked

  • Acceptance test which compares the checksums

Affects versions

None

Environment

None

Checklist

Activity

Show:

eystein.maloy.stenberg June 21, 2019 at 3:58 PM

OK, that sounds good! Deploying a full rootfs once is a pretty easy workaround.

I do think that Raspbian (or more generally Debian family) users would be highly interested in deltas as well. They might have money even though they haven't moved to Yocto. But agreed that the R/O setup for these distros should not be part of this initial iteration.

Kristian Amlie June 21, 2019 at 9:40 AM

It will work once you have upgraded at least once using a full rootfs update, since then you have moved to an artifact, with a known checksum. This artifact can be used to generate a new delta.

But there's a good chance that delta updates won't work for Raspbian anyway, since Raspbian is not built as a R/O filesystem. This would probably require significant further effort, either into making it R/O safe, or to switch to some other design which preserves the R/O delta base somewhere else (maybe in the passive partition?). For now I'm not creating any more tasks, since I think delta update support using mender-convert is a whole project of its own, and I would expect delta update users to be rather serious, and willing to invest in a Yocto build.

eystein.maloy.stenberg June 20, 2019 at 9:24 PM

Thanks for the note. Does this mean that delta updates will not work with Raspbian / mender-convert?
That is a shame since those images are really large and would benefit a lot from delta updates.

However, I do understand that mender-convert is not in the best shape and we should wait for refactoring if this is significant. Better to release delta updates for yocto platforms first than wait for everything to be completed. However we should offer the same features across all our platforms as a general rule.

Kristian Amlie June 20, 2019 at 10:50 AM

: Mender-convert currently fails the equal checksums test, and it's not easy to make it pass, due to how the tool is designed. Making an artifact and making an image are two completely distinct operations, so each one will recreate the image from scratch. Since this involves mounting and copying of files, it is virtually impossible to get the same checksum for those two outputs.

The fix would be to generate one master ext4 image first, and then use that to generate both the artifact and the sdimg, but this is a complete refactoring. We should probably wait with this until doing the generalization/rewrite of mender-convert.

For now, unless anyone has any objections, I will mark the test as xfail on mender-convert.

Fixed

Details

Assignee

Reporter

Labels

Story Points

Priority

Days in progress

3

Sprint

Backlog

yes

Zendesk Support

Checklist

Created June 17, 2019 at 10:41 AM
Updated June 25, 2024 at 11:55 AM
Resolved June 24, 2019 at 8:31 AM