Changing device deployment status without checking for update first

This might not be a typical flow, but I’m trying to change a device deployment status without checking for an update. This device has all of the required information to change the status (deployment id and auth token) but it returns an error in the request. However, as soon as I checked for an update the device then showed up in the deployment as pending and then allowed to change the status.

My question is, is it required to check for an update first before being able to update device deployment status even if you have the correct deployment ID? It seems like the first step is an update check and the server won’t recognize the device until that update check happens.

Interesting, it is probably the case that you need to check for the update fist to trigger some logic in the backend that will transition that device to the deployment or something (not my area really :)).

@tranchitella, can probably shed some light on this.

@msaenger may I ask you which version of Mender you are using? Is the hosted service or are you self-hosting it? If the latter, which version?

Hi @tranchitella. I’m using the starter hosted mender version currently.

@msaenger I confirm this is how it works: device deployment records are created opportunistically when the device checks for updates and the deployment matches. We do not create them upfront, thus you cannot update the status of a device deployment which does not exist yet.

@tranchitella thanks for the confirmation!