balena-os / meta-balena

A collection of Yocto layers used to build balenaOS images
https://www.balena.io/os
968 stars 115 forks source link

Update docker API version in recipes to match balena API version #3438

Closed alexgg closed 2 months ago

alexgg commented 4 months ago

Contributor checklist

Reviewer Guidelines

klutchell commented 3 months ago

I tried building generic-amd64 against this PR and got an error:

ERROR: mkfs-hostapp-native-1.0-r0 do_compile: ExecutionError('/work/build/tmp/work/x86_64-linux/mkfs-hostapp-native/1.0-r0/temp/run.do_compile.29324', 1, None, None)
ERROR: Logfile of failure stored in: /work/build/tmp/work/x86_64-linux/mkfs-hostapp-native/1.0-r0/temp/log.do_compile.29324
Log data follows:
| DEBUG: Executing shell function do_compile
| Sending build context to Docker daemon   5.12kB
| 
| Error response from daemon: client version 1.41 is too new. Maximum supported API version is 1.40
| WARNING: exit code 1 from a shell command.
alexgg commented 3 months ago

I tried building generic-amd64 against this PR and got an error:

ERROR: mkfs-hostapp-native-1.0-r0 do_compile: ExecutionError('/work/build/tmp/work/x86_64-linux/mkfs-hostapp-native/1.0-r0/temp/run.do_compile.29324', 1, None, None)
ERROR: Logfile of failure stored in: /work/build/tmp/work/x86_64-linux/mkfs-hostapp-native/1.0-r0/temp/log.do_compile.29324
Log data follows:
| DEBUG: Executing shell function do_compile
| Sending build context to Docker daemon   5.12kB
| 
| Error response from daemon: client version 1.41 is too new. Maximum supported API version is 1.40
| WARNING: exit code 1 from a shell command.

We could reduce the API version to increase the compatibility with docker hosts, or enforce that the minimum version of a docker installed in the host needs to match the balenaEngine version.

Was this a native build @klutchell or a builder instance?

klutchell commented 3 months ago

Was this a native build or a builder instance?

@alexgg this was on our GitHub runners, using the balena-build.sh helper image. I would expect anyone using the helper image to see the same error, including Jenkins?

Since the helper image provides a DinD I assume we can just bump the version of Docker in there to remain aligned? I've already been considering the bump from Ubuntu 18 to 20 for that image being that 18 is EOL.

As you say we can recommend that users not using the helper image should update their host Docker version.

alexgg commented 3 months ago

@resin-jenkins retest this please

alexgg commented 3 months ago

The helper images has been updated to 22.04.

alexgg commented 3 months ago

Pending on device repositories to update balena-yocto-scripts.

alexgg commented 3 months ago

Requires https://github.com/balena-os/balena-up-board/pull/612

github-actions[bot] commented 2 months ago

Website deployed to CF Pages, 👀 preview link https://65596ea5.balena-os.pages.dev