-
Bug
-
Resolution: Done
-
Medium
-
Casablanca Release
-
None
Docker service cannot be started sometimes, because if /var/run/docker.sock does not exist on the host system/node the docker creates/binds directory with the same name, but the dockerd fails that the socket is a directory
Ansible log:
TASK [docker : Setup docker dns settings] *************************************************************************************************************************************************************************************************** task path: /ansible/roles/docker/tasks/main.yml:19 ok: [kubernetes-node-1] => {"changed": false, "file_attr_diff": {}, "msg": ""} META: ran handlers TASK [docker : Ensure docker is started] **************************************************************************************************************************************************************************************************** task path: /ansible/roles/docker/tasks/main.yml:30 fatal: [kubernetes-node-1]: FAILED! => Unknown macro: {"changed"}
Systemd log:
– Unit docker.service has begun starting up.
dockerd[23116]: can't create unix socket /var/run/docker.sock: is a directory
systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start Docker Application Container Engine.
– Subject: Unit docker.service has failed
Workaround: rm -rf /var/run/docker.sock && systemctl start docker.service