From ccdf3c634342fed2244e2df1c2ca8038725899f0 Mon Sep 17 00:00:00 2001 From: Jan Dubois Date: Fri, 23 Apr 2021 13:47:15 -0700 Subject: [PATCH] Wait for SSH to ready instead of unconditionally waiting for 30s Signed-off-by: Jan Dubois --- pkg/hyperkit/driver.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/hyperkit/driver.go b/pkg/hyperkit/driver.go index 9c43569..4434fa6 100644 --- a/pkg/hyperkit/driver.go +++ b/pkg/hyperkit/driver.go @@ -379,8 +379,9 @@ func (d *Driver) setupNFSMounts() error { if len(d.NFSShares) > 0 { log.Info("Setting up NFS mounts") - // takes some time here for ssh / nfsd to work properly - time.Sleep(time.Second * 30) + if err := drivers.WaitForSSH(d); err != nil { + return err + } err = d.setupNFSShare() if err != nil { // TODO(tstromberg): Check that logging an and error and return it is appropriate. Seems weird.