Closed johnmcollier closed 4 years ago
I'm also facing the same issue. is there any workaround to use overlay in unprivileged mode ?
Did you try with the quay.io/buildah/stable image? Note you need to run with --device /dev/fuse
Yup, I was using an image based off of that.
I can’t pass in the —device
flag when running on Kube, as Kube doesn’t support mounting devices
In crio you can add this device to all containers, Something I think we should do by default.
@rhatdan we have added devfuse in crio config
additional_devices = [
"/dev/fuse:/dev/fuse:rwm",
]
Now all the containers are having fuse device added but still getting the same error.
error mounting new container: error mounting build container "6f17a2a37df4352dc6a08bfbac27d3464a7a38e9d7919c47652854f36be4094e": error creating overlay mount to /var/lib/containers/storage/overlay/be6fb89e2de7c93593f090fe3ba231d07695315b60e38cd561d11792009caa06/merged: using mount program /usr/bin/fuse-overlayfs: fuse: device not found, try 'modprobe fuse' first
@umohnani8 @haircommander PTAL
@smothiki You might need to mod fuse on the host. I wonder if this device even exists on the cri-o node.
Okay did modprobe fuse in the host and it worked in the container
Description
I'm running the buildah docker image (quay.io/buildah/stable:v1.11.3) in Kubernetes (OCP 4.2) as root, but unprivileged. When I go to build a sample application, the build fails with the following error:
If I build with
buildah --storage-driver vfs bud
, it does not fail:It might be because I can't mount /dev/fuse on Kubernetes? (https://github.com/kubernetes/kubernetes/issues/5607#issuecomment-414663936). Is there any way around that?
Steps to reproduce the issue:
buildah bud -t <tag> .
. The build will fail. Butbuildah --storage-driver vfs -t <tag> .
works fineDescribe the results you received: Buildah bud in Kube fails with overlay.
Describe the results you expected: Buildah bud in Kube with overlay works.
Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
:*Output of `cat /etc/release`:**
Output of
uname -a
:Output of
cat /etc/containers/storage.conf
: