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

none without Docker installed: sudo systemctl start docker: exit status 5 #5532

Closed
laith-leo opened this issue Oct 3, 2019 · 27 comments
Closed
Labels
co/none-driver help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@laith-leo
Copy link

Unable to start minikube in RHEL 8 based, due to the missing container runtime as a systemd service.

**[l@minikube ~]$ sudo minikube start --vm-driver=none
😄 minikube v1.4.0 on Centos 8.0.1905
💡 Tip: Use 'minikube start -p ' to create a new cluster, or 'minikube delete' to delete this one.
🔄 Starting existing none VM for "minikube" ...
⌛ Waiting for the host to be provisioned ...

💣 Failed to enable container runtime: running command: sudo systemctl start docker: exit status 5

😿 Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉 https://github.com/kubernetes/minikube/issues/new/choose
[l@minikube ~]$ sudo minikube start --vm-driver=none --container-runtime=cri-o
😄 minikube v1.4.0 on Centos 8.0.1905
💡 Tip: Use 'minikube start -p ' to create a new cluster, or 'minikube delete' to delete this one.
🔄 Starting existing none VM for "minikube" ...
⌛ Waiting for the host to be provisioned ...

💣 Failed to enable container runtime: running command: sudo systemctl restart crio: exit status 5

😿 Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉 https://github.com/kubernetes/minikube/issues/new/choose**:

CentOS Linux release 8.0.1905 (Core):

@afbjorklund
Copy link
Collaborator

Which runtime did you install/want, and what was the entire output of that system to start command ?

@afbjorklund
Copy link
Collaborator

It seems to install OK, as long as docker has been started and selinux has been disabled.

sudo yum install --nobest docker-ce
sudo setenforce 0

There doesn't seem to be any Docker version for CentOS 8 yet, so it installs an older version:

  • docker-ce-18.06.3.ce-3.el7.x86_64
$ sudo minikube start --vm-driver=none
😄  minikube v1.4.0 on Centos 8.0.1905
🤹  Running on localhost (CPUs=2, Memory=3780MB, Disk=17394MB) ...
ℹ️   OS release is CentOS Linux 8 (Core)
🐳  Preparing Kubernetes v1.16.0 on Docker 18.06.3-ce ...
🚜  Pulling images ...
🚀  Launching Kubernetes ... 
🤹  Configuring local host environment ...

⚠️  The 'none' driver provides limited isolation and may reduce system security and reliability.
⚠️  For more information, see:
👉  https://minikube.sigs.k8s.io/docs/reference/drivers/none/

⚠️  kubectl and minikube configuration will be stored in /root
⚠️  To use kubectl or minikube commands as your own user, you may need to relocate them. For example, to overwrite your own settings, run:

    ▪ sudo mv /root/.kube /root/.minikube $HOME
    ▪ sudo chown -R $USER $HOME/.kube $HOME/.minikube

💡  This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true
⌛  Waiting for: apiserver proxy etcd scheduler controller dns
🏄  Done! kubectl is now configured to use "minikube"
💡  For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/

The console looks rather poor, though:
minikube-centos8

@laith-leo
Copy link
Author

You are correct, but I don't want to use Docker, I'm using RHEL8 and want to use Podman for containers management .

@afbjorklund
Copy link
Collaborator

afbjorklund commented Oct 3, 2019

It seems that the messages above ("exit status 5") are a symptom of the software not being installed:

Failed to start crio.service: Unit crio.service not found.

@afbjorklund
Copy link
Collaborator

You are correct, but I don't want to use Docker, I'm using RHEL8 and want to use Podman for containers management .

It seems that there is no crio package for CentOS 8 yet, and for RHEL you are supposed to use OpenShift (rather than Kubernetes)... Podman can run containers, but for this you will need CRI-O.

@afbjorklund
Copy link
Collaborator

Regular podman run is having some out-of-the-box issues as well:
error configuring network namespace for container 8cf402b2d46c31e7fc80fa3a215342b510e18ebc3510e8baf92df941cad4bbd0: Missing CNI default network

Possibly it could be the old version used (1.0.2). But /etc/cni/net.d is empty ?
Could try the "container-tools" module, but I think this will do (podman load)

@laith-leo
Copy link
Author

@afbjorklund RHEL8 uses[1] runc as a Container runtime instead of Docker, and this is the argument I wanted to pass in the --container-runtime but it didn't work, minikube needs the container-runtime as a daemon while it is not a daemon in RHEL8 anymore.

[1] 1.3 in https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/building_running_and_managing_containers/index

@laith-leo
Copy link
Author

@afbjorklund
The CNI default is there, here is the contents of /etc/cni/net.d/87-podman-bridge.conflist:

root@centos8 net.d]# cat 87-podman-bridge.conflist

{
    "cniVersion": "0.3.0",
    "name": "podman",
    "plugins": [
      {
        "type": "bridge",
        "bridge": "cni0",
        "isGateway": true,
        "ipMasq": true,
        "ipam": {
            "type": "host-local",
            "subnet": "10.88.0.0/16",
            "routes": [
                { "dst": "0.0.0.0/0" }
            ]
        }
      },
      {
        "type": "portmap",
        "capabilities": {
          "portMappings": true
        }
      }
    ]
}

@afbjorklund
Copy link
Collaborator

RHEL8 uses[1] runc as a Container runtime instead of Docker,

Docker also uses runc, so those are different types of runtimes...

@afbjorklund afbjorklund added the needs-solution-message Issues where where offering a solution for an error would be helpful label Oct 3, 2019
@afbjorklund
Copy link
Collaborator

We should give a better error message, when trying to use the none driver without having the runtime installed (and running). Currently the output is cryptic, and surely doesn't offer any help remedying:

💣 Failed to enable container runtime: running command: sudo systemctl start docker: exit status 5

It should say something happy like "you need to install a container runtime" (docker/containerd/cri-o)

@laith-leo
Copy link
Author

@afbjorklund
Well the problem is that there is a container runtime already installed in the RHEL8/CentOS8, but the problem is that minikube can't see it, because minikube sees the container runtime only if it is a service/daemon, while it is in the RHEL8/CentOS8 is an embedded with systemd (serverless style).

@afbjorklund
Copy link
Collaborator

@laith-leo : maybe this helps to explain: https://www.ianlewis.org/en/tag/container-runtime-series

@afbjorklund
Copy link
Collaborator

The CNI default is there, here is the contents of /etc/cni/net.d/87-podman-bridge.conflist

Yes, it was included with the podman package. No idea why the file when missing, first time.

@afbjorklund
Copy link
Collaborator

I was able to get CRI-O 1.15.2 running, but it took a lot of hand-holding to get it to actually start...

There are no packages yet, so I used the static builds (some of them, like conmon, even missing!)

You need:

  • crio-v1.15.2.tar.gz (binary)
  • cri-o-1.15.2.tar.gz (source)
  • conmon-2.0.1.tar.gz (source) <-- build this
  • /usr/bin/runc (yum install runc)
  • crictl-v1.15.0-linux-amd64.tar.gz (binary)

This will definitely need some bundling, before it is usable. Hopefully some proper RPMS, too ?


The current kubeadm instructions don't work at all (i.e. the yum repository is completely empty)

# Install prerequisites
yum-config-manager --add-repo=https://cbs.centos.org/repos/paas7-crio-115-release/x86_64/os/

# Install CRI-O
yum install --nogpgcheck cri-o

See: cri-o/cri-o#2833

And podman is 1.0.2-dev

@afbjorklund
Copy link
Collaborator

And for the important stuff, in order to get the emojis working in gnome-terminal you need:

sudo yum install google-noto-emoji-color-fonts

Then it looks better:

minikube-emojis

@laith-leo
Copy link
Author

I knew it that the only to get the things worked is by building and compling the things from source code which is not ideal! I would like to use a regular rpm package from a stable system repository.
From our conversation, I understand that minikube doesn't work in RHEL8/CentOS8. with standard packages and installations.

@laith-leo laith-leo reopened this Oct 4, 2019
@afbjorklund
Copy link
Collaborator

It does work OK, but you are right in that the repositories are not ready yet. The recommendation is to stay with CentOS 7 until they are... (later this year)

You can always use the regular minikube iso, rather than running directly on your host. I haven’t tried, but both VirtualBox and libvirt (KVM) should work.

@afbjorklund
Copy link
Collaborator

And I found out why my podman installation had been broken, it was after the minikube delete:

https://github.com/cri-o/cri-o/blob/master/tutorials/kubeadm.md

First, CRI-O and kubeadm reset don't play well together, as kubeadm reset empties /etc/cni/net.d/.

So that means uninstalling kubernetes breaks all CNI. Not cool.

@afbjorklund afbjorklund added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Oct 5, 2019
@afbjorklund
Copy link
Collaborator

Added #5547 (about "/usr/local/bin") and #5549 (about "docker") for the bugs found when testing this.

@tstromberg tstromberg changed the title Unable to start minikube in RHEL/CentOS 8 none: sudo systemctl start docker: exit status 5 Oct 9, 2019
@tstromberg tstromberg added the kind/support Categorizes issue or PR as a support question. label Oct 9, 2019
@tstromberg tstromberg changed the title none: sudo systemctl start docker: exit status 5 none without Docker installed: sudo systemctl start docker: exit status 5 Oct 9, 2019
@tstromberg
Copy link
Contributor

I swear that https://minikube.sigs.k8s.io/docs/reference/drivers/none/ used to say that Docker was the only supported container runtime for none, but it must have disappeared in a refactor.

I would like to see #5549 get fixed though.

@tstromberg tstromberg added kind/bug Categorizes issue or PR as related to a bug. and removed kind/support Categorizes issue or PR as a support question. labels Oct 30, 2019
@tstromberg
Copy link
Contributor

Marking this as a bug because the user experience here is so bad.

  • We should output a clear error message if Docker is not installed
  • We should output a clear error message if none is used with a non-Docker runtime

Help wanted!

@medyagh
Copy link
Member

medyagh commented Dec 17, 2019

we still need to do this

@medyagh medyagh added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Dec 17, 2019
@tstromberg tstromberg removed the needs-solution-message Issues where where offering a solution for an error would be helpful label Dec 19, 2019
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 18, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 17, 2020
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@KamranShahid
Copy link

#8568

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/none-driver help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants