nestybox / nestybox/sysbox

Replacing oci-runc with sysbox-runc results in EOF errors

Open
#765 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
3.9k
Forks
230
Avg merge
7h 48m
Merged PRs (30d)
3

Description

I am attempting to add sysbox-runc to a concourse ci worker. The concourse deployment is a tarball of binaries including but not limited to containerd, containerd-shim's, init, ctr, runc, and concourse binaries. The binaries refer to another in relative paths, meaning they do not rely on a package manager or systemd. I am mentioning this because there is no docker, and containerd is not installed on the system as a service.

Ultimately I am attempting to enable concourse to run docker-in-container workflows without passing in a privileged flag (on of sysbox's use cases).

Concourse allows using one of three container managers (guardian, containerd, and houdini). For the purposes of this bug, concourse is configured to use containerd.

I attempted to symlink the runc binary to /bin/sysbox-runc, and I also attempted to set a configuration file on containerd so that it would recognize sysbox-runc as its default runtime. In both cases sysbox failed to launch containers.

Error:

initializing
initializing check: image
selected worker: worker1
run check: find or create container on worker worker1: starting task: new task: failed to create shim task: OCI runtime create failed: container_linux.go:427: starting container process caused: process_linux.go:405: getting the final child's pid from pipe caused: EOF: unknown

Expected output:
The container should be created and the job run in the container

System information:
Linux 5.19.0-45-generic #46~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 7 15:06:04 UTC 20 x86_64 x86_64 x86_64 GNU/Linux

Concourse packaged runc information:

runc version 1.1.3
commit: v1.1.3-0-g6724737f
spec: 1.0.2-dev
go: go1.17.10
libseccomp: 2.5.4

Because the spec is 1.0.2-dev I used sysbox-ce_0.6.2:

sysbox-runc
	edition: 	Community Edition (CE)
	version: 	0.6.2
	commit: 	60ca93c783b19c63581e34aa183421ce0b9b26b7
	built at: 	Mon Jun 12 03:49:19 UTC 2023
	built by: 	Cesar Talledo
	oci-specs: 	1.0.2-dev

I was able to directly call sysbox-runc by creating a rootfs and calling sudo sysbox-runc run foobar. Hypothetically, I think the error may have to do with either how pipes or user mappings, or something else is managed between containerd, containerd-shim-runc-v2, and sysbox-runc?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the tarball-based Concourse worker configured for containerd, replacing the packaged runc with sysbox-runc. Compare the containerd, containerd-shim-runc-v2, and sysbox-runc setup with the direct sysbox-runc run foobar invocation. Done means the worker creates the container and runs the job without the EOF error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, linux
Domain
devops, infrastructure, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.