Project31 / ansible-kubernetes-openshift-pi3

Ansible playbooks for setting up a Kubernetes Raspberry Pi 3 cluster
190 stars 56 forks source link

docker daemon doesn't launch after running 'base node setup' playbook #15

Closed nicojanssens closed 7 years ago

nicojanssens commented 7 years ago

Hi,

I downloaded a fresh hypriot image, flashed my rpi 2 SD cards, downloaded the latest version of your ansible files, edited the ansible configs and executed the init machine-id command you mention in your howto. All working fine.

After executing the setup playbook and rebooting the rpis, their docker daemon does not start anymore.

Executing systemctl status docker.service generates the following error

● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled)
   Active: failed (Result: start-limit) since Sun 2017-06-04 10:25:13 CEST; 7min ago
     Docs: https://docs.docker.com
  Process: 969 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 969 (code=exited, status=1/FAILURE)

Jun 04 10:25:11 n0 dockerd[969]: time="2017-06-04T10:25:11.907392501+02:00" level=info msg="libcontainerd: new containerd process, pid: 977"
Jun 04 10:25:12 n0 dockerd[969]: time="2017-06-04T10:25:12.983599830+02:00" level=warning msg="devmapper: Usage of loopback devices is strongly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man docker` to refer to dm.thinpooldev section."
Jun 04 10:25:13 n0 dockerd[969]: time="2017-06-04T10:25:13.106356942+02:00" level=warning msg="devmapper: Base device already exists and has filesystem ext4 on it. User specified filesystem  will be ignored."
Jun 04 10:25:13 n0 dockerd[969]: time="2017-06-04T10:25:13.221333633+02:00" level=fatal msg="Error starting daemon: error initializing graphdriver: \"/var/lib/docker\" contains several valid graphdrivers: devicemapper, overlay2; Please cleanup or explicitly choose storage driver (-s <DRIVER>)"
Jun 04 10:25:13 n0 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Jun 04 10:25:13 n0 systemd[1]: Failed to start Docker Application Container Engine.
Jun 04 10:25:13 n0 systemd[1]: Unit docker.service entered failed state.
Jun 04 10:25:13 n0 systemd[1]: Starting Docker Application Container Engine...
Jun 04 10:25:13 n0 systemd[1]: docker.service start request repeated too quickly, refusing to start.
Jun 04 10:25:13 n0 systemd[1]: Failed to start Docker Application Container Engine.

Do you have any advise?

Thanks!

rhuss commented 7 years ago

Hmm, looks like an issue with the latest Hypriot images and Docker 1.12 which have to use for Kubernetes. I will try to reproduce it ASAP, but since I'm quite busy otherwise, can't make any promise to tackle this soon. Maybe you can also ask in the Hypriot channels on Gitter about this ?

sandor-nemeth commented 7 years ago

Hi,

the issue is that the latest Hypriot image (1.4.0) contains a newer docker, and during uninstall the storage drivers are not removed. Because of this, to start docker up, you need to either provide a -s overlay setting for startup, or there has to be a /etc/docker/daemon.json present with the following contents:

{
    "storage-driver": "overlay"
}

See the docker documentation for the exact configuration.

I may have some time next weekend, and I'll put together a PR to solve this.

rhuss commented 7 years ago

Thanks for the investigation! A PR would be awesome ....