Client reinstalls same artifact when installing two separate software components

We are using Mender (client v5.0.1) for installing an OS and application updates (using docker-compose update-module). We noticed that Mender client will not skip the OS install if an application update has been installed after the OS was installed initially.

OS Artifact:

{
             "clears_artifact_provides": [
                "artifact_group",
                "rootfs_image_checksum",
                "rootfs-image.*"
            ],
            "artifact_provides": {
                "artifact_name": "os-v0.50.0",
                "rootfs-image.checksum": "742a1bc8121b30c6f2e0af5c1153d6d679810237dc0edbb00bd0f5d163c0c5fe",
                "rootfs-image.update-module.app.mender_update_module": "app",
                "rootfs-image.update-module.app.version": "os-v0.50.0",
                "rootfs-image.update-module.directory.mender_update_module": "directory",
                "rootfs-image.update-module.directory.version": "os-v0.50.0",
                "rootfs-image.update-module.mender-configure.mender_update_module": "mender-configure",
                "rootfs-image.update-module.mender-configure.version": "os-v0.50.0",
                "rootfs-image.update-module.rootfs-image.mender_update_module": "rootfs-image",
                "rootfs-image.update-module.rootfs-image.version": "os-v0.50.0",
                "rootfs-image.update-module.single-file.mender_update_module": "single-file",
                "rootfs-image.update-module.single-file.version": "os-v0.50.0",
                "rootfs-image.version": "os-v0.50.0"
            },
}

Application artifact:

{
            "artifact_provides": {
                "artifact_name": "app-v0.2.0",
                "data-partition.app.version": "e23967d2"
            },
            "clears_artifact_provides": [
                "data-partition.app.*"
            ],
}

Example when it is working as expected:

  1. Install OS artifact (client will download β†’ reboot β†’ install) expected
  2. Install OS artifact again (client will report already installed and skip) expected

Example when it is not working as expected:

  1. Install OS artifact (client will download β†’ reboot β†’ install) expected
  2. Install Application artifact (client will download β†’ reboot β†’ install) expected
  3. Install OS artifact (client will download β†’ reboot β†’ install) not expected

I found this issue (and linked JIRA ticket) which indicates that this should be possible. Is there something wrong with the provides block in our artifacts?


Mender versions used:

  • Client v5.0.1
  • Self hosted server v6.3.1
1 Like

Hello @ericwenn

I don’t know what β€œSelf hosted server v6.3.1” means, but if that is an Open Source server please note that provides and depends functionality is an Enterprise feature. Basically what it seems to be happening is that the server only knows about the artifact_name, which is expected on an Open Source server.

@lluiscampos

Yes, I meant open source Mender server v6.3.1.

Is this limitation documented anywhere? Based on the Artifact API documentation I have not been able to find anything indicating that this is only for Enterprise.

@ericwenn To be honest this is not well documented - I will follow-up internally to see how we could improve it.

The nicely rendered API docs at Mender API docs are Enterprise only, for the OS you need to check the Git repo.

The API we need to look at is how the devices get the Artifact:

Note there that only the former has device_provides in the API.

Lluis