Hey guys,
Its me again. I have encountered an expected behaviour which I am unsure how to tailor to my scenario. Let me elaborate.
I am using mender-convert with an mender_create_artifact hook. This results in 2 important files in my case:
- a flashable
*.imgfile to commission new devices (this is the approach I have taken) *.menderartifact, which is to be deployed to the current fleet to bring devices in the field up to date
After flashing *.img file I am receiving from mender convert, I am using mender-configure to setup hostname and timezone. After all that, I am deploying *.mender artifact, generated via mender-convert to the entire fleet.
The fleet receive the artifact update and follows the usual routine. However, the newly commissioned device does receive the artifact too.
Below is step-by-step scenario I am following:
- Use mender-convert to generate
*.imgand*.menderartifact - Flash
*.imgto a device - Accept newly commisioned device on a dashboard
- Deploy mender-configure artifact to finalise setting the device up
- Deploy
*.menderartifact generated via mender-convert
In this case, a newly comissioned device accepts the update and proceeds to download and install it.
Additionally, I have tested another scenario without using mender-configure. In this case I am getting a desired behaviour:
- Use mender-convert to generate
*.imgand*.menderartifact - Flash
*.imgto a device - Accept newly commissioned device on a dashboard
- Deploy
*.menderartifact generated via mender-convert
In this case, a newly commissioned device rejects the update as it is already installed.
Since mender-configure follows a usual artifact flow, it seem to overwrite the latest installed artifact meta data. This makes the client think that mender-convert artifact is not installed, so it proceeds downloading and installing it. However, in my case, I want client to reject this update as it is already installed.
How can I ensure that A/B artifact is not applied after using mender-configure? Can I achieve so via usage of depends/provides? Or do I need to change my deployment strategy?
Looking forward for your responses.