Description of problem: oc start-build --follow=true --wait=true httpd-latest --loglevel=4 build "xxx-yyy-zz" started error getting logs (unable to wait for build xxx-yyy-zz to run: timed out waiting for the condition), waiting for build to complete Version-Release number of selected component (if applicable): 3.7 How reproducible: everytime Steps to Reproduce: Actual results: Expected results: Additional info:
Adam, I believe the current build log logic waits a bit for the build pod to be running before giving up and exiting. The --wait logic will wait basically forever for the build pod to complete. I do not recall why we don't also retry/wait forever for the build pod to be running so we can fetch the logs. It is worth revisiting.
currently we wait 10s for the build to start running when we go to retrieve the logs: https://github.com/openshift/origin/blob/master/pkg/build/registry/buildlog/rest.go#L41 https://github.com/openshift/origin/blob/master/pkg/build/registry/buildlog/rest.go#L84-L91 I don't think we want to change the rest api behavior, but it would be reasonable to change the startbuild logic to retry fetching the logs: https://github.com/openshift/origin/blob/master/pkg/oc/cli/cmd/startbuild.go#L440-L449
(I also think the severity should be lowered. the simple workaround is to run: oc start-build --wait # will wait until the build is complete oc logs build/foo # retrieve the build logs once we know the build is complete
Pull Request: https://github.com/openshift/origin/pull/19695
Commit pushed to master at https://github.com/openshift/origin https://github.com/openshift/origin/commit/7a1bf39a413ca5127b1ff09cff4dd27b883381f0 Improve resilience of oc start-build log streaming * Add retry when attempting to stream build logs. * Increase server-side build wait timeout to 30s. Fixes bug 1575990
Can't reproduce this bug with oc version oc v3.10.0-0.63.0 kubernetes v1.10.0+b81c8f8 features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://**:8443 openshift v3.10.0-0.63.0 kubernetes v1.10.0+b81c8f8 # oc start-build dancer-mysql-example --follow --wait -n install-test --loglevel=4 build "dancer-mysql-example-5" started Cloning "https://github.com/openshift/dancer-ex.git" ... Commit: 950d3f52355c0c6989908419219d2c3cfdf7b8ff (Merge pull request #71 from bparees/httpcookies) Author: Ben Parees <bparees.github.com> Date: Fri Mar 9 12:56:51 2018 -0500 ---> Installing application source ... ---> Copying configuration files...