Meta-mender update - missing /etc/mender/artifact_info

We are using meta-mender in our yocto build environment. We are currently working on dunfell branch.
Last week I updated meta-mender from 45041cfb7b05c2ff44204d592b200493b25ed8ae to b3a10de4a3e5332d91fdea6169db3b0c2eb3f3ee.

After that update, the file /etc/mender/artifact_info is missing in the RootFS. Without that file we are not able to do any deployments to this devices.

As a result, this update will break our OTA-functionality!

As far as I see this change: feat: generate a bootstrap artifact · mendersoftware/meta-mender@222532b · GitHub is causing the problem.

As we are on dunfell, we are using mender-client version 2.6.1 per default. Same issue is there when using latest release 3.4.0. Other versions weren’t tested, I expect 3.3.0 to work when looking at the sources.

We manually fixed this by adding

DISTRO_EXTRA_RDEPENDS += " mender-artifact-info "

to our distro config. Is this the recommended way if fixing the issue?
Is there anything wrong with our configuration?
Does anybody have same issues?

Thanks in advance and best regards
Ruben

2 Likes

Ran into the same issue today, on kirkstone. I can add a few more details as to what happens in runtime.

Starting from a previous working kirkstone installation, if I install a new rootfs mender artifact built today with bitbake, the file /etc/mender/artifact_info is missing on the new rootfs. Then, if I try installing another rootfs mender artifact on top of that, the “mender install” command fails instantly with this error:

ERRO[0000] Reading headers failed: open /etc/mender/artifact_info: no such file or directory
ERRO[0000] open /etc/mender/artifact_info: no such file or directory

The mender client version is 3.4.0 on both new and old rootfs.

Thanks for confirming the issue. Same behaviour on our side when trying to install ANY artifact.

Untested, perhaps only as an idea how to fix: fix: missing dependency to mender-artifact-info for all mender-client… by rschwarz-sotec · Pull Request #1818 · mendersoftware/meta-mender · GitHub

Hi @ruben and thank you for your report.

This is indeed right.

We are working on a fix here.

Hopefully it should be merged very soon.

In the meantime, adding back the mender-artifact-info dependency locally, like you have done is the go-to workaround.

Yes, it’s a known issue, we are working on fixing it. Use the tags for now, either dunfell-v2022.09 or kirkstone-v2022.09.

@kacf thanks for the hint with tags. I will use them from now on

Hello,

with mender client version 3.5.0 and later the dependency for mender-artifact-info is missing again.

Best regards,
Markus

Thanks for the notice @Mowlwurf .

We will have a look at it :smile_cat:

Hey @Mowlwurf, the artifact-info file was never officially supported, and moving away from it has been the official advice for a long time.

You can get the same information by querying mender show-provides [1] to get the current software information.

[1] mender-update show-provides from 4.0.0 and onwards

Hello,

I’m using the mender client in standalone mode in a Yocto kirkstone environment. So my latest usable version is 3.5.2
The commands mender show-provides and mender show-artifact both return unknown after fresh install as well as after an update.

So my last resort is the artifact-info file. I helped me with a mender-client.bbappend in my layer where I add the dependency for the file.

Best regards,
Markus

Something must be wrong in the image build. There is a supposed to be a /data/mender/bootstrap.mender file which initializes the database with correct content. This file gets consumed as soon as the first invocation of Mender happens though. Can you confirm that this file exists in your generated image, before you boot it?

1 Like

Yes, the file is present in my image.
I’m using a Verdin iMX8MM board with BSPv6.2 and the image flashing tool from Toradex.

But I think the problem had solved itself.
I just rebuilded and reflashed my image. After booting up, the file was still there, but the first time the mender client was called on the command line, it disappeared. Now the commands mender show-artifact and mender show-provides are returning the installed software information.
Very weird …

But thank you for your time.

Best regards,
Markus