grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
22.75k stars 3.31k forks source link

Docker rootless error mounting "cgroup" to rootfs at "/sys/fs/cgroup" loki-docker-driver #13034

Open gleb-chipiga opened 1 month ago

gleb-chipiga commented 1 month ago

Describe the bug The following error occurs when installing the loki driver:

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "cgroup" to rootfs at
 "/sys/fs/cgroup": mount /sys/fs/cgroup:/sys/fs/cgroup (via /proc/self/fd/6), flags: 0x100f: invalid argument: unknown

To Reproduce Steps to reproduce the behavior:

  1. Install Ubuntu 22.04 (kernel 6.5.0-35-generic)
  2. Install docker https://docs.docker.com/engine/install/ubuntu/ (Docker version 26.1.3, build b72abbb)
  3. Setup rootless mode https://docs.docker.com/engine/security/rootless/
  4. Run docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions

Expected behavior Should install correctl.

Environment:

Screenshots, Promtail config, or terminal output

latest: Pulling from grafana/loki-docker-driver
Digest: sha256:82270b494d8c157f035fde65bc0159076f4c4361b5bb061b4fc817e8db04234a
32dbe5a742d5: Complete
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "cgroup" to rootfs at
 "/sys/fs/cgroup": mount /sys/fs/cgroup:/sys/fs/cgroup (via /proc/self/fd/6), flags: 0x100f: invalid argument: unknown
1md3nd commented 1 week ago

Getting same issue while deploying loki on k8s cluster

Node

docker version = 26.0.0.2

Error

exitCode: 128
        finishedAt: "2024-06-26T20:01:08Z"
        message: 'failed to create task for container: failed to create shim task:
          OCI runtime create failed: runc create failed: unable to start container
          process: exec: "/usr/bin/loki": stat /usr/bin/loki: bad message: unknown'
        reason: ContainerCannotRun