-
Notifications
You must be signed in to change notification settings - Fork 455
overlayfs storage driver on GitHub runner #1751
-
A couple of days ago I think the GitHub runner change to a new docker engine which uses overlayfs, but I think cross requires overlay2. My builds no longer build due to this error.
info: downloading component 'rust-src'
info: installing component 'rust-src'
Error:
0: want driver overlay2, got overlayfs
I did try using the main branch of cross but I get this error
Error:
0: No merge directory found
Location:
src/docker/shared.rs:1424
Not sure how to get this to work again, so for now I am using a self hosted runner that runs an old docker version.
Is anybody getting this error?
Beta Was this translation helpful? Give feedback.
All reactions
This is a known issue. I looked at the cross source (src/docker/shared.rs line ~1420-1431) and the problem is that cross checks if the driver name contains "overlay", then tries to read MergedDir from the GraphDriver data. But overlayfs (the newer driver name) structures that data differently than overlay2, so it either can't find MergedDir or hits the fallback error.
The quickest fix for GitHub Actions is to force the Docker daemon back to overlay2 before running cross:
- name: Fix Docker storage driver run: | echo '{"storage-driver": "overlay2"}' | sudo tee /etc/docker/daemon.json sudo systemctl restart docker
Put that as the first step in your job, before any cross commands. ...
Replies: 1 comment
-
This is a known issue. I looked at the cross source (src/docker/shared.rs line ~1420-1431) and the problem is that cross checks if the driver name contains "overlay", then tries to read MergedDir from the GraphDriver data. But overlayfs (the newer driver name) structures that data differently than overlay2, so it either can't find MergedDir or hits the fallback error.
The quickest fix for GitHub Actions is to force the Docker daemon back to overlay2 before running cross:
- name: Fix Docker storage driver run: | echo '{"storage-driver": "overlay2"}' | sudo tee /etc/docker/daemon.json sudo systemctl restart docker
Put that as the first step in your job, before any cross commands. This works on the current Ubuntu runner images because the kernel still supports both drivers, it's just that Docker defaults to overlayfs now.
There's also issue #1671 and #1588 tracking this on the cross-rs side. A proper fix would be updating that driver check to handle both overlay2 and overlayfs, but until that ships, forcing the daemon config is the workaround.
Beta Was this translation helpful? Give feedback.