Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runc not found (debian, project karmic) #2113

Closed
AstraLuma opened this issue Jan 26, 2020 · 9 comments · Fixed by #2182
Closed

runc not found (debian, project karmic) #2113

AstraLuma opened this issue Jan 26, 2020 · 9 comments · Fixed by #2182

Comments

@AstraLuma
Copy link

Description

Basically the same as #1754 but with a different distro and package.

Buildah is unable to find runc. I have it at /usr/sbin/runc from the runc package provided by debian. It's normal for debian to not have the sbin paths on PATH for normal users.

Steps to reproduce the issue:

#!/bin/sh
set -x
build=$(buildah from python:3-slim)
buildah run $build -- pip install poetry

Describe the results you received:

🐚 sh test.sh                                                                               master
+ buildah from python:3-slim
+ build=python-working-container-18
+ buildah run python-working-container-18 -- pip install poetry
error running container: error creating container for [/usr/local/bin/pip install poetry]: : exec: "runc": executable file not found in $PATH
ERRO exit status 1  

Describe the results you expected:
Successful running of a command

Output of rpm -q buildah or apt list buildah:

buildah/unknown,now 1.12.0-5 amd64 [installed]
buildah/unknown 1.12.0-5 arm64
buildah/unknown 1.12.0-5 armhf
buildah/testing 1.10.1-5 i386
buildah/unknown 1.12.0-5 ppc64el

Output of buildah version:

Version:         1.12.0
Go Version:      go1.13.5
Image Spec:      1.0.1-dev
Runtime Spec:    1.0.1-dev
CNI Spec:        0.4.0
libcni Version:  
image Version:   5.0.0
Git Commit:      
Built:           Thu Jan 23 23:11:07 2020
OS/Arch:         linux/amd64

Output of cat /etc/*release:

PRETTY_NAME="Debian GNU/Linux bullseye/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Output of uname -a:

Linux cayde7 5.4.0-2-amd64 #1 SMP Debian 5.4.8-1 (2020-01-05) x86_64 GNU/Linux

Output of cat /etc/containers/storage.conf:

(Does not exist)

@TomSweeneyRedHat
Copy link
Member

@lsm5 PTAL

@lsm5
Copy link
Member

lsm5 commented Feb 17, 2020

@lsm5 PTAL

@TomSweeneyRedHat remind me how buildah searches for runc? IIRC, podman has the paths available by default in a config file, can buildah reuse those?

@TomSweeneyRedHat
Copy link
Member

@lsm5 I believe we look for it in /usr/bin/runc

@lsm5
Copy link
Member

lsm5 commented Feb 17, 2020

@lsm5 I believe we look for it in /usr/bin/runc

and what's the right way to specify a non-default path?

@TomSweeneyRedHat
Copy link
Member

I'll let @rhatdan handle that one @lsm5

@rhatdan
Copy link
Member

rhatdan commented Feb 17, 2020

@TomSweeneyRedHat We should move to supporting it similarly to how podman does. We have containers.conf in the system now, so buildah should walk the list of runtimes and find one to make it work.
@TomSweeneyRedHat Could you look into making this happen?

@lsm5
Copy link
Member

lsm5 commented Feb 19, 2020

@lsm5 I believe we look for it in /usr/bin/runc

So, debian's own runc installs to /usr/sbin and afaik, docker installs a runc to /usr/bin. So, we should use a different path to avoid conflict, preferably re-use podman's.

@rhatdan
Copy link
Member

rhatdan commented Feb 21, 2020

@TomSweeneyRedHat or @lsm5 we have now merged containers/common into buildah, so could one of you open a PR to use the containers/common to figure out the runc to use, and match what podman is doing.

@TomSweeneyRedHat
Copy link
Member

I'll take a look this afternoon.

TomSweeneyRedHat added a commit to TomSweeneyRedHat/buildah that referenced this issue Feb 22, 2020
After receiving the determing the type of runtime to use,
either "runc" or "crun" dependent upon the system, search
the list of that type of runtime in the containers.conf
file.  It includes the location of those runtimes in a
number of different architectures.  Once found, set the
runtime to use to that value.

Fixes: containers#2113

Signed-off-by: TomSweeneyRedHat <[email protected]>
TomSweeneyRedHat added a commit to TomSweeneyRedHat/buildah that referenced this issue Feb 22, 2020
After determining the type of runtime to use,
either "runc" or "crun" dependent upon the system, search
the list of that type of runtime in the containers.conf
file.  It includes the location of those runtimes in a
number of different architectures.  Once found, set the
runtime to use to that value.

Fixes: containers#2113

Signed-off-by: TomSweeneyRedHat <[email protected]>
TomSweeneyRedHat added a commit to TomSweeneyRedHat/buildah that referenced this issue Feb 24, 2020
After determining the type of runtime to use,
either "runc" or "crun" dependent upon the system, search
the list of that type of runtime in the containers.conf
file.  It includes the location of those runtimes in a
number of different architectures.  Once found, set the
runtime to use to that value.

Fixes: containers#2113

Signed-off-by: TomSweeneyRedHat <[email protected]>
TomSweeneyRedHat added a commit to TomSweeneyRedHat/buildah that referenced this issue Feb 27, 2020
After determining the type of runtime to use,
either "runc" or "crun" dependent upon the system, search
the list of that type of runtime in the containers.conf
file.  It includes the location of those runtimes in a
number of different architectures.  Once found, set the
runtime to use to that value.

Fixes: containers#2113

Signed-off-by: TomSweeneyRedHat <[email protected]>
bors bot added a commit that referenced this issue Feb 27, 2020
2182: Search for local runtime per values in containers.conf r=rhatdan a=TomSweeneyRedHat

After determining the type of runtime to use,
either "runc" or "crun" dependent upon the system, search
the list of that type of runtime in the containers.conf
file.  It includes the location of those runtimes in a
number of different architectures.  Once found, set the
runtime to use to that value.

Fixes: #2113

Signed-off-by: TomSweeneyRedHat <[email protected]>

Co-authored-by: TomSweeneyRedHat <[email protected]>
@bors bors bot closed this as completed in 31cffe9 Feb 27, 2020
@bors bors bot closed this as completed in #2182 Feb 27, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants