chris-short / rak8s

Stand up a Raspberry Pi based Kubernetes cluster with Ansible
MIT License
365 stars 112 forks source link

The docker install script fails #16

Closed premkumar-masilamani closed 6 years ago

premkumar-masilamani commented 6 years ago

The docker install script fails with the below exception

TASK [kubeadm : Run Docker Install Script]

"stdout_lines": [
        "", 
        "# Executing docker install script, commit: 1d31602", 
        "+ sh -c apt-get update -qq >/dev/null", 
        "+ sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null", 
        "+ sh -c curl -fsSL \"https://download.docker.com/linux/raspbian/gpg\" | apt-key add -qq - >/dev/null", 
        "Warning: apt-key output should not be parsed (stdout is not a terminal)", 
        "+ sh -c echo \"deb [arch=armhf] https://download.docker.com/linux/raspbian stretch edge\" > /etc/apt/sources.list.d/docker.list", 
        "+ [ raspbian = debian ]", 
        "+ sh -c apt-get update -qq >/dev/null", 
        "+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null", 
        "E: Sub-process /usr/bin/dpkg returned an error code (1)"
    ]
premkumar-masilamani commented 6 years ago

When I execute the same cluster the second time, apt-get upgrade command fails. I logged into one of the pi and executed the command manually. Here is the error message.

After this operation, 0 B of additional disk space will be used.
Setting up docker-ce (18.03.0~ce-0~raspbian) ...
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Sun 2018-04-01 07:30:04 UTC; 30ms ago
     Docs: https://docs.docker.com
  Process: 7671 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 7671 (code=exited, status=1/FAILURE)
      CPU: 435ms

Apr 01 07:30:04 raspberrypi systemd[1]: docker.service: Unit entered failed state.
Apr 01 07:30:04 raspberrypi systemd[1]: docker.service: Failed with result 'exit-code'.
dpkg: error processing package docker-ce (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)
asachs01 commented 6 years ago

@smileprem If you check in /var/log/syslog, you'll likely see what I saw, which was an error about cgroups not being enabled on the Pis. After digging around, it looks like there's another option to add to roles/common/files/cmdline.txt: cgroup_enable=memory. I've got #17 in to add this.

asachs01 commented 6 years ago

@smileprem looks like there is already an issue (#11) open for this.

premkumar-masilamani commented 6 years ago

Hi All - I had to reduce the GPU Memory to the lowest setting. Added the below lines in /boot/config.txt file.

gpu_mem=16

I had to do this for all the machines. After this I was able to install the docker. I use Raspberry Pi 3 Model B. This should go into the documentation.

HannanSolo commented 6 years ago

Are you able to init master?

asachs01 commented 6 years ago

@HannanSolo I can't get the master to init :( It just hangs right now. I'll have to get in and manually troubleshoot to see what's up.

HannanSolo commented 6 years ago

@asachs01 im on the same page as you, lemmi open a issue so others can join.