# Help: No reboot after rollback with custom update module (NeedsArtifactReboot="Yes")

**URL:** <https://hub.mender.io/t/help-no-reboot-after-rollback-with-custom-update-module-needsartifactreboot-yes/3863>\
**Category:** General Discussions\
**Tags:** needsartifactreboot\
**Created:** [July 12, 2021, 2:34pm UTC](https://hub.mender.io/t/help-no-reboot-after-rollback-with-custom-update-module-needsartifactreboot-yes/3863 "2021-07-12T14:34:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbz](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@mbz](https://hub.mender.io/u/mbz)\
**Post date:** [July 12, 2021, 2:34pm UTC](https://hub.mender.io/t/help-no-reboot-after-rollback-with-custom-update-module-needsartifactreboot-yes/3863/1 "2021-07-12T14:34:12Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [July 13, 2021, 7:10am UTC](https://hub.mender.io/t/help-no-reboot-after-rollback-with-custom-update-module-needsartifactreboot-yes/3863/2 "2021-07-13T07:10:03Z")

</div>

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](https://tracker.mender.io/browse/MEN-4882).

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.

---

<div class="post-metadata">

**Author:** ![mbz](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@mbz](https://hub.mender.io/u/mbz)\
**Post date:** [July 13, 2021, 7:41am UTC](https://hub.mender.io/t/help-no-reboot-after-rollback-with-custom-update-module-needsartifactreboot-yes/3863/3 "2021-07-13T07:41:27Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [July 13, 2021, 9:04am UTC](https://hub.mender.io/t/help-no-reboot-after-rollback-with-custom-update-module-needsartifactreboot-yes/3863/4 "2021-07-13T09:04:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mbz](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@mbz](https://hub.mender.io/u/mbz)\
**Post date:** [July 14, 2021, 6:14am UTC](https://hub.mender.io/t/help-no-reboot-after-rollback-with-custom-update-module-needsartifactreboot-yes/3863/5 "2021-07-14T06:14:38Z")

</div>

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”
