I was trying to add an EC2 host via the UI and also rancher-cli, specifying a CoreOS AMI. The resulting error was: Error creating machine: Error running provisioning: ssh command error:
Unfortunately the rest of the error is not visible in the rancher server logs. So I went in to the server and ran the docker-machine command from the logs. The error was more informative:
Error creating machine: Error running provisioning: ssh command error:
command : sudo systemctl -f start docker
err : exit status 5
output : Failed to start docker.service: Unit early-docker.target not found.
I found this issue in https://github.com/docker/machine/issues/3980 . My docker-machine is an earlier one inside rancher:
$ docker exec -it rancher-server bash
root@0d7b8ffba8d7:/# docker-machine version
docker-machine version 0.8.2, build b98be6e
So I downloaded docker-machine 0.10.0 binary inside the rancher-server docker container, and issuing the same docker-machine command I could create the host:
Provisioning with coreOS...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
But now the host is not showing up in the UI - which is understandable.
My questions:
- Is it a known issue that the interesting part of the error message is not showing up in the rancher logs?
- Is there a way I can check or control the docker-machine version? Perhaps similarly to the way you specify the docker version, the shipped docker-machine version could be listed in the release notes.
Thanks,