Skip to content
This repository has been archived by the owner on Feb 27, 2018. It is now read-only.

Wait longer for vm to boot #270

Merged
merged 2 commits into from
Oct 14, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func cmdUp() error {
fmt.Printf("\nWaiting for Docker daemon to start...\n")
}

time.Sleep(300 * time.Millisecond)
time.Sleep(600 * time.Millisecond)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a Windows-specific problem (just a guess)?
So now if there is a real problem with the VM, everyone will have to wait 18 seconds to find out about it instead of 9 seconds?
Instead, could we do something like:

n := 30
if runtime.GOOS == "windows" {
        n = 60
}
for i := 0; i < n; i++ {
...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is on OS X, not windows.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gmlewis yeah, this is because of the TLS certificate generation that now occurs on boot2docker up (which we then have to wait for so we can copy them back out of the VM to connect back in over TLS)

socket := ""
for i := 1; i < 30; i++ {
print(".")
Expand All @@ -113,7 +113,7 @@ func cmdUp() error {
if B2D.Verbose {
fmt.Printf("Error requesting socket: %s\n", err)
}
time.Sleep(300 * time.Millisecond)
time.Sleep(600 * time.Millisecond)
}
fmt.Printf("\nStarted.\n")

Expand All @@ -128,7 +128,7 @@ func cmdUp() error {
}
// Copying the certs here - someone might have have written a Windows API client.
certPath, err := RequestCertsUsingSSH(m)
if err != nil && B2D.Verbose {
if err != nil {
// These errors are not fatal
fmt.Fprintf(os.Stderr, "Error copying Certificates: %s\n", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding:
"Warning: error copying...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll go ahead and add these text changes in master now that this is merged. Thanks @gmlewis ❤️

}
Expand Down Expand Up @@ -172,7 +172,7 @@ func cmdShellInit() error {
}

certPath, err := RequestCertsUsingSSH(m)
if err != nil && B2D.Verbose {
if err != nil {
// These errors are not fatal
fmt.Fprintf(os.Stderr, "Error copying Certificates: %s\n", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...and here too: "Warning: error copying...

}
Expand Down