Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call device update hook when target OS release changes #1852

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cywang117
Copy link
Contributor

This allows Supervisors that support Supervisor-managed OS upgrades to trigger a HUP.

See: https://balena.fibery.io/Work/Improvement/API-and-SDK-changes-for-supervisor-hostOS-updates-2348
Change-type: minor

This allows Supervisors that support Supervisor-managed OS upgrades
to trigger a HUP.

See: https://balena.fibery.io/Work/Improvement/API-and-SDK-changes-for-supervisor-hostOS-updates-2348
Change-type: minor
Signed-off-by: Christina Ying Wang <[email protected]>
if (
(request.values.is_pinned_on__release !== undefined ||
request.values.belongs_to__application != null ||
request.values.device_name != null) &&
request.values.device_name != null ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the supervisor only updated the device name for containers when they were receiving other updates? In which case there's no point to trigger a supervisor update check in that case as it would just be unnecessary load

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Supervisor stores the most up-to-date device name in its config table of its sqlite database though, and uses this for SV API's /v2/device/name calls. You're right though that BALENA_DEVICE_NAME_AT_INIT env var for services only changes when starting up the service, and changing the name doesn't result in a service restart by itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants