Is there a way to force push an update to a device that already has that same deployment on it? For instance I have a unit I updated last week to version “1.2.0” and it had a weird failure so I want to update it clean again to the same “1.2.0” version. The only thing I have figured out to let me do this is to downgrade it to “1.1.0” and then upgrade it to “1.2.0” which is not ideal since it takes way longer and sometimes we have state scripts that may not handle downgrades very well.
Hi @kevlan, understood but with the current implementation there is no way to do this. The server will detect that you are already running the version in question and call the deployment complete.
I have, in some demo cases, manually edited the /etc/mender/artifact_info file on a target to fake it out. Basically, edit that file, change the currently installed artifact name and rerun your deployment. I don’t recommend that as an ongoing thing but for a one-off fix, it may get you past this issue.
Note that this will not work on Mender 2.0 and later unless the device is freshly installed. Once the first Artifact is installed, the name is stored in the database, not in /etc/mender/artifact_info. There is unfortunately no convenient way to change this database at the moment, so oleorhagen’s suggestion may be more appropriate in that case.
Thanks for the clarification @kacf. I thought that was going to become the case at some point but it still worked for me. I guess I was always running on freshly installed systems.