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

Infinite loop attempting to apply configuration variable with invalid value #1915

Open
pdcastro opened this issue Apr 5, 2022 · 1 comment

Comments

@pdcastro
Copy link

pdcastro commented Apr 5, 2022

If the RESIN_HOST_ODMDATA_configuration configuration variable is set to value 0 through the web dashboard, the supervisor gets in a loop logging:

05.04.22 14:22:05 (+0200) Applied boot config: {"configuration":"0"}
05.04.22 14:22:05 (+0200) Applying boot config: {}
05.04.22 14:22:05 (+0200) Applied boot config: {}
05.04.22 14:22:05 (+0200) Applying boot config: {"configuration":"0"}
05.04.22 14:22:05 (+0200) Applied boot config: {"configuration":"0"}
05.04.22 14:22:05 (+0200) Applying boot config: {}
05.04.22 14:22:06 (+0200) Applied boot config: {}
05.04.22 14:22:06 (+0200) Applying boot config: {"configuration":"0"}
05.04.22 14:22:06 (+0200) Applied boot config: {"configuration":"0"}
05.04.22 14:22:06 (+0200) Applying boot config: {}
05.04.22 14:22:06 (+0200) Applied boot config: {}
05.04.22 14:22:06 (+0200) Applying boot config: {"configuration":"0"}
05.04.22 14:22:06 (+0200) Applied boot config: {"configuration":"0"}
05.04.22 14:22:06 (+0200) Applying boot config: {}
05.04.22 14:22:07 (+0200) Applied boot config: {}
05.04.22 14:22:07 (+0200) Applying boot config: {"configuration":"0"}

JF Pattern RESIN_HOST_ODMDATA_configuration var on TX2 devices states:

Setting RESIN_HOST_ODMDATA_configuration = 0 on a TX2 device causes it to spam the log that it's applying new boot configs, but they are all empty. It is not clear that the available config options are from 1 to 6.

Indeed, the valid values for RESIN_HOST_ODMDATA_configuration appear to be 1 to 6, as defined at:
https://github.com/balena-io/open-balena-api/blob/v0.203.0/src/features/vars-schema/env-vars.ts#L230-L239

If it is a case that the supervisor attempts value validation and fails (I do not know that it is the case, though), then it should perhaps remember this and not keep trying again.

A closely related issue seems to be #1743.

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

No branches or pull requests

2 participants