Environment variable updates

Hi!
First and foremost, thank you for the awesome openbalena project :slight_smile:
I was trying to figure out one feature, but this seems to be part of the balenaCloud stack.

  1. Running a self-hosted openbalena
  2. I have a fleet and one device running
  3. I am updating an environment variable

In balenacloud all services on the affected device are automatically restarted and the new environment variables are fetched after step 3 is performed. On openbalena however, nothing happens, I would have to reboot the device for that to happen.

Some extra infos:
After modifying or updating or deleting any environment variable, I see the devices’ supervisor successfully talking to the openbalena stack:

...
GET /v1/device 200 - 91.723 ms
[api]     GET /v2/applications/1/state 200 - 63.692 ms
...

What would be the best way to achieve this, or more generally, when changing any metadata about a given device?
For now, I saw that issuing an update request does the trick Interacting with the balena Supervisor - Balena Documentation

Thanks,
Dan

Hello,

can you please share the balenaOS version and supervisor version that you are running?
It seems to be pretty old, as it calls for /v1/device and /v2/applications/1/state

Best Regards
Harald

Hi,
running on 2.113.18

BR,
Dan

Hello,

can you also please specify the balena-supervisor version running on the device?

Best Regards
Harald

Hi,
also rather new: 14.9.4

BR,
Dan

Hello,

thanks for providing these information.
I was confused by the log that you’ve shared:

GET /v1/device 200 - 91.723 ms
[api]     GET /v2/applications/1/state 200 - 63.692 ms

These log lines are showing that some service on the device is calling the supervisor API: Interacting with the balena Supervisor - Balena Documentation and Interacting with the balena Supervisor - Balena Documentation

Please share more loglines for the supervisor service with: journalctl -f -u balena-supervisor -n 200

In addition, how do you inspect that the environment variable has not updated? Did you perform an printenv inside a container to verify it’s not updated or set?

Best Regards
Harald