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):
Steps to Reproduce:
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:
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:
(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
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
features: Basic-Auth GSSAPI Kerberos SPNEGO
# 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 <firstname.lastname@example.org>
Date: Fri Mar 9 12:56:51 2018 -0500
---> Installing application source ...
---> Copying configuration files...