Error starting Openshift Origin on CentOS 7: systemd cgroup driver vs cgroupfs driver

Following the instructions to install the Openshift Origin binary from here,  on first attempt to start it up I got this error:

failed to run Kubelet: failed to create kubelet: 
misconfiguration: kubelet cgroup driver: "systemd" is different from docker cgroup driver: "cgroupfs"

Per instructions in this issue ticket, to verify which cgroup drivers docker is using I used:

$ sudo docker info |grep -i cgroup

Cgroup Driver: cgroupfs

Unfortunately the steps to check the cgroup driver for kubernetes don’t match with my install because I’m guessing the single binary Openshift Origin has it packaged all in one, so there is no corresponding systemd config for it.

This article suggested to configure the cgroups driver for Docker so it matches kubernetes, but it looks like the yum install for docker-ce doesn’t configure systemd for it either.

Ok, to the docs. Per the Docker docs for configuring systemd here, it suggests to pull to preconfigured files from a git repo and place them in /etc/systemd/system

Now I have the systemd files for Docker in place,  this articles says to add this arg to the end of the ExecStart line in docker.service:

--exec-opt native.cgroupdriver=systemd

Now reload my config and restart the docker service:

sudo systemctl daemon-reload
sudo systemctl restart docker

and let’s check again what cgroups driver we’re using with:

$ sudo docker info |grep -i cgroup

Cgroup Driver: systemd

… and now we’ve switched to systemd.

Ok, starting up Openshift again, this issue is resolved, there’s a lot of log output as the server starts up. After opening up the firewall ports for 8443, my Openshift Console is now up!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.