Closed hetong07 closed 3 years ago
However, if I run with minikube start --driver=none
, it starts correctly.
Dig up a little bit:
After the start failure, I immediately check the docker and got:
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e6d6770fedf4 gcr.io/k8s-minikube/kicbase:v0.0.17 "/usr/local/bin/entr…" 4 minutes ago Created 127.0.0.1:49196->22/tcp, 127.0.0.1:49195->2376/tcp, 127.0.0.1:49194->5000/tcp, 127.0.0.1:49193->8443/tcp minikube
If I then use docker container start e6d6770fedf4
, I will receive:
Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:459: container init caused: process_linux.go:422: setting cgroup config for procHooks process caused: failed to write "0" to "/sys/fs/cgroup/system.slice/docker-e6d6770fedf4f9dab9331df44b5f644956013d6b765cabe540e33cac665b1f21.scope/memory.swap.max": open /sys/fs/cgroup/system.slice/docker-e6d6770fedf4f9dab9331df44b5f644956013d6b765cabe540e33cac665b1f21.scope/memory.swap.max: permission denied: unknown
Error: failed to start containers: e6d6770fedf4
So the problem seems to be the docker container has been created, but somehow could not be started?
Looks related to cgroups v2 (can you confirm?), so probably the same issue as: #10371
$ docker info | grep "Cgroup Version"
Cgroup Version: 1
WARNING: No swap limit support
WARNING: No blkio weight support
WARNING: No blkio weight_device support
If indeed --memory-swap
doesn't work anymore, we should make that flag conditional...
$ docker run --memory 256m --memory-swap 256m busybox echo Hello World
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
Hello World
However, if I run with
minikube start --driver=none
, it starts correctly.
Then the kubelet runs on the node, and there is no privileged node container.
The kubelet might have similar issues with restricting memory, haven't checked.
It's related to the Debian kernel having certain features disabled by default:
@afbjorklund Thank you for you reply...
I tried commands you mentioned and below are the outputs:
$ docker info | grep "Cgroup Version"
Cgroup Version: 2
WARNING: No kernel memory TCP limit support
WARNING: No oom kill disable support
WARNING: Support for cgroup v2 is experimental
$ docker run --memory 256m --memory-swap 256m busybox echo Hello World
Unable to find image 'busybox:latest' locally
latest: Pulling from library/busybox
4c892f00285e: Pull complete
Digest: sha256:e1488cb900233d035575f0a7787448cb1fa93bed0ccc0d4efc1963d7d72a8f17
Status: Downloaded newer image for busybox:latest
docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:459: container init caused: process_linux.go:422: setting cgroup config for procHooks process caused: failed to write "0" to "/sys/fs/cgroup/system.slice/docker-cd70bce022b084fbd59f5aff3af9f8fd238cc637bae1e968d8c1db1467e21646.scope/memory.swap.max": open /sys/fs/cgroup/system.slice/docker-cd70bce022b084fbd59f5aff3af9f8fd238cc637bae1e968d8c1db1467e21646.scope/memory.swap.max: permission denied: unknown.
ERRO[0001] error waiting for container: context canceled
So the solution is to check the Cgroup version and make the parameter optional? It so, I can help make that change....
This issue appears to be a duplicate of #10371, do you mind if we move the conversation there?
Ths way we can centralize the content relating to the issue. If you feel that this issue is not in fact a duplicate, please re-open it using /reopen
. If you have additional information to share, please add it to the new issue.
Thank you for reporting this!
Hello, I tried to run the
minikube start
on my Debian machine and gotI tried to run
minikube delete --all
and restart my computer, but that problem remains.Below is the full log with '--alsologtostderr'