This will turn off the password authentication prompt which some SSH
commands experience if there is a lag between when we attempt the first
SSH command and the key has been loaded on the server.
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
The main goal of this patch was to make the VirtualBox driver wait for
SSH before trying to get the IP of the VM. The generic WaitForSSH
method required a Host struct as an arg. This patch moves most of the
logic to the driver package so that drivers can call WaitForSSH. The
existing functions in host are just wrappers to the real
implementation in drivers now.
Signed-off-by: Darren Shepherd <darren@rancher.com>
This also lays the foundation for the possibility of log drivers in the
future, if it is decided that is a direction to pursue.
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
This improves on a few issues which are not frequent but do sometimes
come up:
1. Check that the daemon is up before attempting to do anything
docker-ey in provisioning Ubuntu
2. Set a max retries for SSH so that if a request fails it attempts
again before giving up
Also have annotated a few of the SSH options slightly better.
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
Adds a check to find ssh-keygen in the user's $PATH, in the event it
can't find it, return an error with a friendly message
Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>