containers / buildah

A tool that facilitates building OCI images.
https://buildah.io
Apache License 2.0
7.3k stars 770 forks source link

Issues with Centos/ version 3.* Kernels #240

Closed TomSweeneyRedHat closed 6 years ago

TomSweeneyRedHat commented 7 years ago

Pinesh Shah Reports as a reply to the buildah blog:

Hi Tom,

It was really a nice and simple article to have a quick view of buildah at work.

Although i tried setting up buildah on centos, the buildah command is up and now i am able to see the buildah version information

$buildah --version buildah version 0.3 (image-spec 1.0.0, runtime-spec 1.0.0)

Although when i try a simple buildah from for eg. $buildah from centos ERRO[0000] driver not supported driver not supported

Not sure why did you face something similar to this or any idea where i should start exploring on this.

Thanks & Regards, Pinesh Shah

In addition I tried myself and received a kernel age error. I suspect that Pinesh's issue is due to runc being older than buildah is expecting. I'm not as sure about the error that I received, it may be a configuration issue as I threw the vm together pretty quickly.

buildah from centos

ERRO[0000] kernel too old to provide multiple lowers feature for overlay: driver not supported kernel too old to provide multiple lowers feature for overlay: driver not supported

cat /etc/*release

CentOS Linux release 7.3.1611 (Core) NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.3.1611 (Core) CentOS Linux release 7.3.1611 (Core) [root@localhost buildah]# rpm -qa | grep runc runc-1.0.0-6.gite800860.el7.x86_64

rhatdan commented 7 years ago

buildah --storage-driver=devicemapper ...

Should fix his issue. There is a change I just got merged into containers/storage that was forcing overlay on CentOS and RHEL, which is causing these issues, I believe.

TomSweeneyRedHat commented 7 years ago

Thanks Dan. I found the issue that I was having. You need to update the kernel in order to get overlayfs to work. It requires version 4.0+ and CentOS 7 is at:

# uname -a
Linux localhost.localdomain 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
The latest kernel is:
# uname -a
Linux localhost.localdomain 4.12.4-1.el7.elrepo.x86_64 #1 SMP Thu Jul 27 20:03:28 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux

To update  the kernel (per https://www.ostechnix.com/install-linux-kernel-4-12-centos-ubuntu/): 
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum install yum-plugin-fastestmirror
yum --enablerepo=elrepo-kernel install kernel-ml

Reboot and select the 4.* variant kernel on the console.

# buildah from centos
Getting image source signatures
Copying blob sha256:7b6bb4652a1be64d39920f7d8c12c5f0bd8abfc10820177109e73817357c07e3
 67.22 MiB / 67.22 MiB [=======================================================]
Copying config sha256:36540f359ca3b021d4b6a37815e9177b6c2bb3817598979ea55aee7ecc5c2c1f
 0 B / 1.79 KiB [--------------------------------------------------------------]
Writing manifest to image destination
Storing signatures
centos-working-container

# buildah containers
CONTAINER ID  BUILDER  IMAGE ID     IMAGE NAME                       CONTAINER NAME
eab40069a941     *     cd3de852a969 docker.io/library/centos:latest  centos-working-container
# buildah images
IMAGE ID             IMAGE NAME                                               CREATED AT             SIZE
cd3de852a969         docker.io/library/centos:latest                          Jul 5, 2017 21:04      183.6 MB
rhatdan commented 7 years ago

Right we need to start requiring 7.4 or later kernels for all of the tools rather then dealing with systems that do not support overlay file system.

boaz0 commented 6 years ago

I guess mentioning this in README.md is good enough for closing this ticket, unless you have a better idea.

TomSweeneyRedHat commented 6 years ago

372 should fix this.

TomSweeneyRedHat commented 6 years ago

Closing, fixed with #372