Skip to content

Commit

Permalink
Fix various issues with new wait method
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
  • Loading branch information
nathanleclaire committed Sep 16, 2015
1 parent 6caebf5 commit 0b4755f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 1 addition & 8 deletions libmachine/provision/coreos.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/docker/machine/libmachine/drivers"
"github.com/docker/machine/libmachine/engine"
"github.com/docker/machine/libmachine/log"
"github.com/docker/machine/libmachine/mcnutils"
"github.com/docker/machine/libmachine/provision/pkgaction"
"github.com/docker/machine/libmachine/swarm"
)
Expand Down Expand Up @@ -58,13 +57,7 @@ func (provisioner *CoreOSProvisioner) Service(name string, action pkgaction.Serv

// wait until docker is running
if (name == "docker") && (action.String() == "start") {
ip, err := provisioner.GetDriver().GetIP()
if err != nil {
return err
}
if err := mcnutils.WaitForDocker(ip, 2376); err != nil {
return err
}
waitForDocker(provisioner, 2376)
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion libmachine/provision/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func ConfigureAuth(p Provisioner) error {
}

func waitForDocker(p Provisioner, dockerPort int) {
utils.WaitForSpecific(func() bool {
mcnutils.WaitForSpecific(func() bool {
// HACK: Check netstat's output to see if anyone's listening on the Docker API port.
if _, err := p.SSHCommand(fmt.Sprintf("netstat -a | grep %d", dockerPort)); err != nil {
return false
Expand Down

0 comments on commit 0b4755f

Please sign in to comment.