You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While waiting for the Ironic API to come up, there's a for loop that tries the API, and on failure sleeps for 5 seconds and then tries again until the specified timeout is reached:
// FIXME(stbenjam): After we sleep at the end of the loop, *something* is changing log output to be discarded, and
// when we get woken up again, our logs aren't printed anymore until the end of the loop. Very odd error, possibly
// something in terraform is doing this.
log.Printf("[DEBUG] Trying to connect to API, attempt %d of %d\n", tries, maxTries)
r, err:=httpClient.Get(client.Endpoint)
iferr==nil {
statusCode:=r.StatusCode
r.Body.Close()
ifstatusCode==http.StatusOK {
log.Printf("[DEBUG] API successfully connected.")
returnnil
}
}
time.Sleep(5*time.Second)
}
The logging in that for loop is only output once while inside openshift/installer. All the output occurs when running the tests, so I think it's something that happens while terraform is being executed in the openshift/installer.
The way that time.Sleep works is that the goroutine gets blocked and the Go scheduler wakes it up after the specified duration. It appears that something is setting log output to ioutil.Discard or similar while the goroutine is asleep. Haven't figured out how to set breakpoints in the installer's invocation of terraform yet, which would probably help here. I see a few calls to log.SetOutput(ioutil.Discard) in terrraform and openshift/installer but not any obvious ways those code paths would be taken while the goroutine is asleep.
The text was updated successfully, but these errors were encountered:
While waiting for the Ironic API to come up, there's a
for
loop that tries the API, and on failure sleeps for 5 seconds and then tries again until the specified timeout is reached:terraform-provider-ironic/ironic/provider.go
Lines 198 to 215 in 3927537
The logging in that
for
loop is only output once while inside openshift/installer. All the output occurs when running the tests, so I think it's something that happens while terraform is being executed in the openshift/installer.The way that
time.Sleep
works is that the goroutine gets blocked and the Go scheduler wakes it up after the specified duration. It appears that something is setting log output toioutil.Discard
or similar while the goroutine is asleep. Haven't figured out how to set breakpoints in the installer's invocation of terraform yet, which would probably help here. I see a few calls tolog.SetOutput(ioutil.Discard)
in terrraform and openshift/installer but not any obvious ways those code paths would be taken while the goroutine is asleep.The text was updated successfully, but these errors were encountered: