balena-io-modules / balena-preload

Script for preloading containers onto balena device images
https://www.balena.io/
Apache License 2.0
35 stars 8 forks source link

preload should accept "compatible architectures" (image vs application) #214

Closed pdcastro closed 4 years ago

pdcastro commented 4 years ago

Copying from balena-io/balena-cli/issues/1588:

As reported in the linked support thread, running balena preload results in the error: "Application architecture (rpi) and image architecture (armv7hf) do not match"

It appears that the code in the balena-preload module is testing for architecture "equality" rather than "compatibility": https://github.com/balena-io/balena-preload/blob/v8.3.0/lib/preload.js#L662-L668

Elsewhere, the CLI already uses an SDK function isArchitectureCompatibleWith, so it may be a case of using that function instead of equality comparison.

pdcastro commented 4 years ago

Resolved by PR #215