I use a REST call to create a deployment for a specific device ID. When I sudo mender check-update on my device to force the client to check for a server update, I see that the deployment status is updated to pending, but the device does not seem to find any update info, and thus cannot be updated.
If I create a deployment for the same device and artifact using the GUI, after sudo mender check-updateing on the device the deployment immediately jumps into ‘inprogress’ and awaits user confirmation.
This used to work when creating a deployment via REST before the major bump. Has something changed on this front? Has anyone experienced a similar issue?
I’m not aware of any issues here, recently used this very mechanism.
Which “major version” bump are you referring to? There should not have been anything that affects this. The sudo mender invocation suggests that this is a debianoid image on Mender Client 3.X, but can you please give a few more details? Eventually check the logs?
Thanks for responding so quickly!
We are using mender client 3.5.2.
I checked the journal and it doesn’t really give me a lot of info. For the deployment that I create via REST, I see the following once I force check for an update on the server:
Jan 24 17:53:30 x mender[6861]: time="2024-01-24T17:53:30+01:00" level=info msg="Forcing state machine to: update-check"
Jan 24 17:53:30 x mender[6861]: time="2024-01-24T17:53:30+01:00" level=info msg="State transition: check-wait [Idle] -> update-check [Sync]"
Jan 24 17:53:30 x mender[6861]: time="2024-01-24T17:53:30+01:00" level=info msg="State transition: update-check [Sync] -> check-wait [Idle]"
Jan 24 17:59:03 x mender[6861]: time="2024-01-24T17:59:03+01:00" level=info msg="State transition: check-wait [Idle] -> inventory-update [Sync]"
Jan 24 17:59:04 x mender[6861]: time="2024-01-24T17:59:04+01:00" level=info msg="State transition: inventory-update [Sync] -> check-wait [Idle]"
Jan 24 17:59:05 x mender[6861]: time="2024-01-24T17:59:05+01:00" level=info msg="State transition: check-wait [Idle] -> update-check [Sync]"
Jan 24 17:59:05 x mender[6861]: time="2024-01-24T17:59:05+01:00" level=info msg="State transition: update-check [Sync] -> check-wait [Idle]"
But maybe I create the deployment incorrectly?
This is my rest call to deploy one artifact to one device ID:
Hi Josef! Do you have to specify 'name': 'device_id'? From the NewDeployment scheme in the Mender API docs, I inferred that this should be free-form? But I might have missed something.
I ask, because I am noticing that I also have to set the name field to the device_id in order to get the deployment created successfully.