This PR updates the Engine to use the latest version of the containerd shim runtime. The version we were previously using is deprecated. Furthermore, this update allows us to use different container runtimes (like crun) and cgroups v2.
Built a test version of balena OS for Pi 4 (from this test branch) including this change.
Verified that the device was able pull an initial release and updates.
Same for basic container lifecycle operations (stop, resume, etc)
Manually added systemd.unified_cgroup_hierarchy=1 to the cmdline.txt file to get a"pure cgroups v2" device (confirmed by mount | grep cgroup). Redid the same checks as above.
Manually configured the device to use crun instead of runc. Seems to work fine.
Though, for the record, there seems to be a hardcoded reference to runc during the Engine initialization, so the Engine will fail to start on a device without runc. (This comes directly from Moby and I haven't looked much into it. But to be clear, this doesn't seem to affect which runtime is actually used to run containers.)
This PR updates the Engine to use the latest version of the containerd shim runtime. The version we were previously using is deprecated. Furthermore, this update allows us to use different container runtimes (like
crun
) and cgroups v2.Most of the required changes are coming from this balena-containerd PR.
Here's some of the manual testing I did:
systemd.unified_cgroup_hierarchy=1
to thecmdline.txt
file to get a"pure cgroups v2" device (confirmed bymount | grep cgroup
). Redid the same checks as above.crun
instead ofrunc
. Seems to work fine.runc
during the Engine initialization, so the Engine will fail to start on a device withoutrunc
. (This comes directly from Moby and I haven't looked much into it. But to be clear, this doesn't seem to affect which runtime is actually used to run containers.)(If you want all the details, I kept notes about my testing on Fibery.)
Solves #284