Delay in response from supervisor API

Hi,
I am sending following request to supervisor API:
curl -v -X POST --header “Content-Type:application/json” --data ‘{“force”: true}’ “$BALENA_SUPERVISOR_ADDRESS/v1/update?apikey=$BALENA_SUPERVISOR_API_KEY”

Sometimes the update begins within a few seconds, other times there is a delay of 5-10 minutes before it starts (though it always starts eventually).

Any ideas what may be causing these delays?

Hello there! How are you checking wether the update has started or not? It might be that it starts right away but dashboard takes a bit to update, specially on low end devices like a Raspberry Pi Zero, what device are you using?

You can try monitoring the supervisor logs with journalctl -u balena-supervisor --follow and run the curl command. You should immediately see the update event request and the images being pulled.

Hello again,
Thanks for the reply, here is some more information:

  1. I can see there is no action in the dashboard’s ‘logs’ window. When the update process does eventually begin you see a lot of activity as it terminates various services and restarts…

  2. Our device is a Raspberry Pi 3 model B+

  3. We are running Supervisor version 11.12.4

  4. The update is already downloaded onto the device but there is a lock file /tmp/balena/updates.lock (so we are calling update with {“force”: true})

  5. I can’t run ‘journalctl -u balena-supervisor --follow’ inside the container but I can run in on the host OS.

  6. I also opened a log stream using an API request to /v2/local/logs (this runs fine in the container).

So I started logging according 5) and 6) and I then called /v1/update which returns normally with a 204 status code. Result: nothing happens, and nothing appearing in logs. Then about 10 minutes later it just starts doing its stuff (still nothing in the logs - but of course this is probably because my access to the dashboard is being temporarily blocked as the system restarts)

Hope the above info is useful…