Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

overlayfs storage driver on GitHub runner #1751

Answered by Nickalus12
ginodamario asked this question in Q&A
Discussion options

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?

You must be logged in to vote

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

Comment options

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.

You must be logged in to vote
0 replies
Answer selected by ginodamario
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /