Description of problem: The build process does a git ls-remote to check if a repo is accessible. the timeout is hardcoded at 16s. Since, it is not able to get repository it timesout after 16 seconds. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. oc start-build aaabbb --follow --build-loglevel=5 aaabbb-3 I0516 16:50:24.256697 1 builder.go:41] $BUILD env var is {"kind":"Build","apiVersion":"v1","metadata":{"name":"aaabbb-3","namespace":"mat","selfLink":"/oapi/v1/namespaces/mat/builds/aaabbb-3","uid":"ce5ff12c-1ba7-11e6-8a43-0a5d3910846d","resourceVersion":"80148","creationTimestamp":"2016-05-16T20:50:21Z","labels":{"app":"aaabbb","buildconfig":"aaabbb","openshift.io/build-config.name":"aaabbb"},"annotations":{"openshift.io/build.number":"3"}},"spec":{"serviceAccount":"builder","source":{"type":"Git","git":{"uri":"https://github.com/openshift/nodejs-ex.git","ref":"master"}},"strategy":{"type":"Source","sourceStrategy":{"from":{"kind":"DockerImage","name":"registry.access.redhat.com/openshift3/nodejs-010-rhel7:latest"},"env":[{"name":"BUILD_LOGLEVEL","value":"5"}]}},"output":{"to":{"kind":"DockerImage","name":"172.30.3.99:5000/mat/aaabbb:latest"},"pushSecret":{"name":"builder-dockercfg-zlcji"}},"resources":{}},"status":{"phase":"New","outputDockerImageReference":"172.30.3.99:5000/mat/aaabbb:latest","config":{"kind":"BuildConfig","namespace":"mat","name":"aaabbb"}}} I0516 16:50:24.263935 1 sti.go:167] With force pull false, setting policies to if-not-present I0516 16:50:24.263951 1 sti.go:173] The value of ALLOWED_UIDS is [1-] I0516 16:50:24.263966 1 cfg.go:45] Locating docker auth for image registry.access.redhat.com/openshift3/nodejs-010-rhel7:latest and type PULL_DOCKERCFG_PATH I0516 16:50:24.264019 1 cfg.go:81] Using Docker authentication configuration in '/root/.docker/config.json' I0516 16:50:24.264327 1 cfg.go:53] Problem accessing /root/.docker/config.json: stat /root/.docker/config.json: no such file or directory I0516 16:50:24.264340 1 cfg.go:45] Locating docker auth for image 172.30.3.99:5000/mat/aaabbb:latest and type PUSH_DOCKERCFG_PATH I0516 16:50:24.264344 1 cfg.go:81] Using Docker authentication configuration in '/var/run/secrets/openshift.io/push/.dockercfg' I0516 16:50:24.264497 1 cfg.go:67] Using serviceaccount user for Docker authentication for image 172.30.3.99:5000/mat/aaabbb:latest I0516 16:50:24.275448 1 docker.go:224] Image registry.access.redhat.com/openshift3/nodejs-010-rhel7:latest available locally I0516 16:50:24.277739 1 sti.go:195] Creating a new S2I builder with build config: "Builder Name:\t\tNode.js 0.10\nBuilder Image:\t\tregistry.access.redhat.com/openshift3/nodejs-010-rhel7:latest\nSource:\t\t\tfile:///tmp/s2i-build739792746/upload/src#master\nOutput Image Tag:\t172.30.3.99:5000/mat/aaabbb:latest\nEnvironment:\t\tOPENSHIFT_BUILD_NAME=aaabbb-3,OPENSHIFT_BUILD_NAMESPACE=mat,OPENSHIFT_BUILD_SOURCE=https://github.com/openshift/nodejs-ex.git,OPENSHIFT_BUILD_REFERENCE=master,BUILD_LOGLEVEL=5\nIncremental Build:\tdisabled\nRemove Old Build:\tdisabled\nBuilder Pull Policy:\tif-not-present\nQuiet:\t\t\tdisabled\nLayered Build:\t\tdisabled\nWorkdir:\t\t/tmp/s2i-build739792746\nDocker NetworkMode:\tcontainer:c3e047b3a27e3e95cb2de024a49eb3fde7fd0395c7f208180af9e2db3a6ecd27\nDocker Endpoint:\tunix:///var/run/docker.sock\n" I0516 16:50:24.280294 1 docker.go:224] Image registry.access.redhat.com/openshift3/nodejs-010-rhel7:latest available locally I0516 16:50:24.284749 1 sti.go:201] Starting S2I build from mat/aaabbb-3 BuildConfig ... I0516 16:50:24.284764 1 sti.go:140] Preparing to build 172.30.3.99:5000/mat/aaabbb:latest I0516 16:50:24.287061 1 source.go:96] git ls-remote https://github.com/openshift/nodejs-ex.git --heads I0516 16:50:24.287103 1 repository.go:275] Executing git ls-remote https://github.com/openshift/nodejs-ex.git --heads I0516 16:50:40.288169 1 cleanup.go:23] Removing temporary directory /tmp/s2i-build739792746 I0516 16:50:40.288190 1 fs.go:117] Removing directory '/tmp/s2i-build739792746' F0516 16:50:40.288428 1 builder.go:185] Error: build error: timeout while waiting for remote repository "https://github.com/openshift/nodejs-ex.git" 2. 3. Actual results: Fails everytime after 16 seconds with no clear message Expected results: 1) the timeout should be configurable 2) And a clearer message should be displayed Additional info: https://github.com/openshift/origin/issues/8772
This PR introduces an exponential timeout in the builder instead of a configurable one. https://github.com/openshift/origin/pull/9124
verified and failed with clear imformation Image contains io.openshift.s2i.scripts-url set to 'image:///usr/libexec/s2i' I0606 07:30:13.627648 1 glog.go:50] Starting S2I build from [wewang nodejs-ex-38]/%!s(MISSING) BuildConfig ... I0606 07:30:13.627667 1 sti.go:142] Preparing to build wewang/nodejs-ex-38:1c297a30 Downloading "https://github.com/wewang58/nodejs-ex" ... I0606 07:30:13.633689 1 glog.go:50] git ls-remote --heads [https://github.com/wewang58/nodejs-ex] error streaming logs: read tcp 54.173.59.42:8443: connection timed out
Moving back to MODIFIED based on the fact that this is an OSE bug and this fix is not merged into the OSE repo. We'll move this back to ON_QA once it's been merged into OSE either as a 3.3 build or as a cherry-pick back into 3.2.
This has been merged and is in OSE v3.3.0.8 or newer.
verified in openshift v3.3.0.8 kubernetes v1.3.0+57fb9ac etcd 2.3.0+git
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1933