nestybox / sysbox

An open-source, next-generation "runc" that empowers rootless containers to run workloads such as Systemd, Docker, Kubernetes, just like VMs.
Apache License 2.0
2.78k stars 153 forks source link

ubuntu-bionic-systemd:latest fails to start #690

Closed potter-jason closed 1 year ago

potter-jason commented 1 year ago

Coming off fresh install off sysbox on Debian 11 Bullseye with no install issues. First thing I wanted to try was SystemD containers, but I got this error before completion:

docker: Error response from daemon: failed to create shim task: OCI runtime create failed: container_linux.go:424: starting container process caused: process_linux.go:368: applying cgroup configuration for process caused: systemd version is < 218; sysbox-runc requires version >= 218 for cgroup delegation.: unknown.

Any thoughts on what is happening?

ctalledo commented 1 year ago

Hi @potter-jason, thanks for trying Sysbox.

What's the version of systemd on your Debian 11 host? systemctl --version

Also, show me the output of ls -l /sys/fs/cgroup to see if you are on cgroups v1 or v2.

ctalledo commented 1 year ago

As a work-around, reconfiguring the Docker Engine to use native cgroups as opposed to systemd-managed cgroups will likely fix the issue.

In /etc/docker/daemon.json, add:

{
  "exec-opts": ["native.cgroupdriver=cgroupfs"]
}

Then:

systemctl restart docker

And try again.

potter-jason commented 1 year ago

In addition to the runtime info already in the file? This is the current content of /etc/docker/daemon.json { "runtimes": { "sysbox-runc": { "path": "/usr/bin/sysbox-runc" } } }

You're saying make it look like this, correct: { "runtimes": { "sysbox-runc": { "path": "/usr/bin/sysbox-runc"

"exec-opts": ["native.cgroupdriver=cgroupfs"]

   }

} }

On Wed, May 3, 2023 at 9:12 AM Cesar Talledo @.***> wrote:

As a work-around, reconfiguring the Docker Engine to use native cgroups as opposed to systemd-managed cgroups will likely fix the issue.

In /etc/docker/daemon.json, add:

{ "exec-opts": ["native.cgroupdriver=cgroupfs"] }

Then:

systemctl restart docker

And try again.

— Reply to this email directly, view it on GitHub https://github.com/nestybox/sysbox/issues/690#issuecomment-1533324986, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZP6C4KNYTNHLJGSFFHECK3XEJ7YNANCNFSM6AAAAAAXUTF6OM . You are receiving this because you were mentioned.Message ID: @.***>

-- Jason Potter

ctalledo commented 1 year ago

Hi @potter-jason, more like this:

{
  "exec-opts": ["native.cgroupdriver=cgroupfs"],
  "runtimes": {
       "sysbox-runc": {
          "path": "/usr/bin/sysbox-runc"
       }
   }
}
potter-jason commented 1 year ago

that did it.. thank you!

On Wed, May 3, 2023 at 1:30 PM Cesar Talledo @.***> wrote:

Hi @potter-jason https://github.com/potter-jason, more like this:

{ "exec-opts": ["native.cgroupdriver=cgroupfs"], "runtimes": { "sysbox-runc": { "path": "/usr/bin/sysbox-runc" } } }

— Reply to this email directly, view it on GitHub https://github.com/nestybox/sysbox/issues/690#issuecomment-1533692753, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZP6C4NUWTQXAOSV7J2C43TXEK55DANCNFSM6AAAAAAXUTF6OM . You are receiving this because you were mentioned.Message ID: @.***>

-- Jason Potter

ctalledo commented 1 year ago

Cool, glad that helped.

For future reference (in case other users hit the same issue), what's the version of systemd on your Debian 11 host? systemctl --version