-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binary source build timeout after 5 minutes in case of an error #9923
Comments
The very same happens when going directly via REST to the API (as we do for the fabric8-maven-plugin), so it is very likely a server issue, not a client issue. |
This is basically working as designed. For any build if the output imagestream isn't available, we'll retry for up to 30 minutes waiting or the output imagestream to appear. This is necessary particularly in cases where you create multiple objects simultaneously (eg you create the output imagestream and the build at the same time) since they might appear in any order, so we retry to see if it appears. If you had created the output imagestream within the 5 minute binary build timeout, I think you would have seen a successful build. As is it, the binary build times out sooner than the 30 minute "waiting for the imagestream" timeout, which is why you saw the behavior you did. Can you attempt to create the imagestream after creating the binary build and confirm that the build does end up succeeding in that case? |
My point is that the In that cases where a build never can succeed isn't it possible to fail early ? But maybe I do miss something here ... |
Maybe in this case it could be sufficient to throw an error when the On the other hand, a lot of errors in OpenShift are reported asynchronously (like when an image couldn't be pulled), why not do it here in the same way ? I.e. returning from the |
@rhuss ok the actual issue here is that we do not validate the ImageStreamTag name you provided when you created the buildconfig, so as you say, we should be throwing the error when you create the buildconfig because the buildconfig is not technically valid. doing it asynchronously doesn't make sense in this case since that imagestreamtag name will never be valid/resolveable. |
Agreed, would be fine for me with an early validation. With being async I don't only meant this specific case, but more as a general note. Even waiting on an imagestream synchronously in general is a bit contradictory to the way how e.g. OpenShift / Kubernetes waits on the end of an image pull for a pod to start. But I'm fine with that, just wanted to point out the difference in UX here. |
When starting a Docker build with a binary source with
oc start-build
and the build has an error like an invalid imagestream name, thenoc start-build
blocks forever without ever returning.Version
Steps To Reproduce
BuildConfig
and anImageStream
:Note that the output image stream name is invalid because of the contained
/
Current Result
The original
oc start-build
times out after 5 minutesIf there is is no error in the build config and the build succeeds, then this command returns within seconds.
Expected Result
An error should be printed immediately and the command should be aborted. I suspect that the HTTP connection over which the tar is sent is not closed properly after an error ocured on the server side.
The text was updated successfully, but these errors were encountered: