A custom update module supporting rollback and reboot for .deb packages does not reboot after rollback
A mender artifact containing some .deb packages could be installed succesfully. The reboot takes place and mender-client continues according to the state machine
An other mender artifact, containing a deb file, which always fails to install (for testing the rollback, returning -1 on postinst script) the rollback takes place as expected, but the reboot does not.
The statemachine switches directly to ArtifactFailure. (NeedsArtifactReboot=“Automatic” or “Yes”)
Logging the calls to the update module with its parameters shows, that in this case the module never gets called with the parameter NeedsArtifactReboot
This is a bug I recently became aware of myself as well. The client should call NeedsArtifactReboot if it has not already called it, when it is considering which rollback state to go to. For now I have copied your text into a bug report.
A workaround you can do is to simply do the reboot from ArtifactRollback. You will need to record somewhere that you are performing the reboot, since the client will retry ArtifactRollback afterwards, so unless you record it, you will be stuck in an endless loop.
Thank you for the fast clarification - what do you think: how long will it take to get a fix so that we may keep out the workaround as we want to go ‘live’ soon?
I will try to push for fixing this, but even in the best case it’s probably a few months out at least, since we are just about to release a new version right now, and we won’t have time to make it part of that release.
A reboot within the ArtifactRollback basically works - but this reveals an other bug?!
after restarting mender-client, the authentication to the server is lost and not reestablished:
in the following states this messages is repeated several times in the syslog for different stati:
level=error msg=“statescript: Can not send start status to server: (request_id: ): reporti
ng status failed, bad status 500 server error message: failed to parse server response: json: cannot unmarshal object into Go struct field .error of type string”