From fbb8898914fb7869b96017e79c5b67ff4003ed16 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 11 Apr 2015 08:17:57 +0200 Subject: [PATCH] drivers/google: don't wait for SSH to be ready Waiting for SSH is done in libmachine. There are some additional steps after waiting for SSH but none of them seem to require SSH to be ready to be executed. Signed-off-by: Vincent Bernat --- drivers/google/compute_util.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/google/compute_util.go b/drivers/google/compute_util.go index 45ee1c00cb..a0cfe19bc6 100644 --- a/drivers/google/compute_util.go +++ b/drivers/google/compute_util.go @@ -194,13 +194,6 @@ func (c *ComputeUtil) createInstance(d *Driver) error { return err } - instance, err = c.instance() - if err != nil { - return err - } - ip := instance.NetworkInterfaces[0].AccessConfigs[0].NatIP - c.waitForSSH(ip) - // Update the SSH Key sshKey, err := ioutil.ReadFile(d.GetSSHKeyPath() + ".pub") if err != nil { @@ -280,12 +273,6 @@ func (c *ComputeUtil) waitForGlobalOp(name string) error { }) } -// waitForSSH waits for SSH to become ready on the instance. -func (c *ComputeUtil) waitForSSH(ip string) error { - log.Infof("Waiting for SSH...") - return ssh.WaitForTCP(fmt.Sprintf("%s:22", ip)) -} - // ip retrieves and returns the external IP address of the instance. func (c *ComputeUtil) ip() (string, error) { if c.ipAddress == "" {