Mender show-provides returns nothing

Hi,

I created a new mender rootfs artifact (using mender-artifact 3.5.0) and installed it on the device via mender -install (mender client version 2.5.0).
After booting into the new image I don’t get any output via “mender show-provides” as described in Software versioning | Mender documentation

I was expecting to get the rootfs-image.version, which is set in the artifact (verified with “mender-artifact read”):
Updates:
0:
Type: rootfs-image
Provides:
rootfs-image.checksum: 12e434063264e187577b2ecda3e9e2e105f2eeac90d599b47c95250d92ae94f1
rootfs-image.version: rc_cube_v21.04.0-pre2

Is this not supported when installing in standalone mode, is there something else I need to do or is this a bug?

Thanks, Felix

Hi Felix,

I think this is supposed to work but there is at least one other similar report. @kacf can you comment?

Drew

Did you commit the update? You probably just need to do that: “mender commit”. I noticed that the “Provides” are only updated when the update is committed.

Yes, the update is committed.

Did you happen to use the --no-default-software-version argument while building the artifact? This is often used to upgrade old devices which don’t support the software versioning, and if left in place, will prevent software versioning from working.

No, I did not explicitly disable this. And as mentioned earlier it seems to correctly be part of the mender artifact:

“mender-artifact read” reports rootfs-image.version under provides, which matches the “type-info” content in the artifact

I can’t reproduce this here. Can you post the full output from mender-artifact read, as well as the exact commands you used, including intermediary commands, such as reboot.

mender-artifact read:

Mender artifact:
  Name: rc_cube_v21.04.0-pre2
  Format: mender
  Version: 3
  Signature: signed but no key for verification provided; please use `-k` option for providing verification key
  Compatible devices: '[rc_cube]'
  Provides group: 
  Depends on one of artifact(s): []
  Depends on one of group(s): []
  State scripts:

Updates:
    0:
    Type:   rootfs-image
    Provides:
	rootfs-image.checksum: 12e434063264e187577b2ecda3e9e2e105f2eeac90d599b47c95250d92ae94f1
	rootfs-image.version: rc_cube_v21.04.0-pre2
    Depends: Nothing
    Clears Provides: ["artifact_group", "rootfs_image_checksum", "rootfs-image.*"]
    Metadata: Nothing
    Files:
      name:     rootfs.ext4
      size:     10962862080
      modified: 2021-03-22 16:41:14 +0100 CET
      checksum: 12e434063264e187577b2ecda3e9e2e105f2eeac90d599b47c95250d92ae94f1

To install: sudo -n mender -log-level debug -log-file /tmp/mender-update.log -install <artifact>
Then rebooted and commited.

Seems I cannot attach the log as file…

Hm… after updating again (with the same mender artifact), I now get the expected output from “mender show-provides”.

Yes, I can’t see anything wrong in your output. I guess you solved it for now, but let us know if you find a way to reproduce it.

Yes, it’s working now and I can’t reproduce it any more.
Maybe it was because the mender store was somehow not “initialized” yet when updating the first time or something like that…