Modifying Mender client version in Yocto sumo

Hello, I’ve integrated Mender with a Yocto sumo build and I have successfully connected it to the demo server. I can also send OTA updates.

But now, I am facing 2 problems:

  1. The version of the mender client I am currently using is by default 1.7.1. Is it possible to modify this version to a newer one? Will it still be compatible with yocto sumo? (On the official github repository of meta-mender, branch sumo, there is no mender-client folder and that’s why I am asking).

  2. When I send an update, I want to wait for user confirmation before the ArtifactReboot state. I did that by adding a new state script in a recipe that inherits mender-state-scripts. Obviously, if there is no confirmation from the user, the script returns 21 so that the server could try again later. The script only checks if a file exists and does not contain any loop that would block mender.
    The problem is that the server calls this script only once: if the returned value is 21, nothing happens. If the value is 0, the reboot begins.
    I did not set the variables StateScriptRetryTimeoutSeconds and StateScriptRetryIntervalSeconds in mender.conf so that the default values will be used. Also, it was a bit confusing given the fact that before Mender v2.0 these two variables were reversed and I didn’t know whether it was the client version (that is currently 1.7.1 on my setup), or the server (that is >2.0).

Could you tell me where should I look to solve these problems?

Thank you!

Hi @teonaseverin,

The recipe for the Mender client was renamed in newer branches which is why you don’t see a mender-client_* recipe. It looks like the version 2.2.1 recipe is in sumo but you will need to enable it. Since 2.0 came out long after sumo and was a major version update we did not want to change the default on sumo. To make this change, add the following to your local.conf:

PREFERRED_VERSION_pn-mender = “2.%”
PREFERRED_VERSION_pn-mender-artifact = “3.%”
PREFERRED_VERSION_pn-mender-artifact-native = “3.%”

I suggest you update to the newer Mender version before we spend much time on debugging your state scripts. What you describe certainly sounds like it should work. From within your script, if you log to stderr, that info will appear in the Mender client logs which may give us an idea of what is going on.

Drew