Fix Docker daemon wait

Also, a few various cleanups are bundled:

1. Only call GetDriver() once to get the object in provision/utils.go
2. SSH command wrapper will return the error and let the consumer decide
   what to do with it instead of bailing automatically on non-255

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
This commit is contained in:
Nathan LeClaire
2015-08-12 15:38:40 -07:00
parent 1ae222b926
commit 9453df4859
11 changed files with 151 additions and 89 deletions

View File

@@ -1,22 +0,0 @@
package ssh
import (
"net"
"time"
"github.com/docker/machine/libmachine/log"
)
func WaitForTCP(addr string) error {
for {
log.Debugf("Testing TCP connection to: %s", addr)
conn, err := net.DialTimeout("tcp", addr, 2*time.Second)
if err != nil {
continue
}
defer conn.Close()
return nil
}
}