balena-os / balena-supervisor

Balena Supervisor: balena's agent on devices.
https://balena.io
Other
150 stars 63 forks source link

Issue collection for `config-json.target` change in balenaOS 2.82.6 #1875

Open cywang117 opened 2 years ago

cywang117 commented 2 years ago

As of balenaOS 2.82.6, with the addition of the config-json.target service, any config.json change will cause systemd to restart the following services:

# systemctl list-dependencies config-json.target
config-json.target
● ├─avahi-daemon.service
● ├─balena-hostname.service
● ├─balena-net-config.service
● ├─balena-ntp-config.service
● ├─development-features.service
● ├─dnsmasq.service
● ├─os-sshkeys.service
● └─prepare-openvpn.service

Because balenaEngine requires development-features.service as a dependency, this means balenaEngine is also restarted.

Below is a working list of any issues that are related to this OS change:

klutchell commented 2 years ago

The changes from https://github.com/balena-os/balena-supervisor/pull/1776 will need to be revisited when https://github.com/balena-os/meta-balena/pull/2495 is merged.

jellyfish-bot commented 2 years ago

[cywang117] This issue has attached support thread https://jel.ly.fish/87c6b0a4-66be-4767-a2b4-5d60b6a9013f

cywang117 commented 2 years ago

In the above linked issue, setting API poll interval followed by disabling VPN as fleet config vars caused the Supervisor to apply the API poll interval but not disable VPN, due to the engine getting restarted by config-json.target in between. This change persisted after engine restart despite VPN_CONTROL being false in the Supervisor database (I assume this VPN_CONTROL value was set in the database but the Supervisor did not have time to turn off the VPN). Restarting the Supervisor caused it to pick up the correct changes.