Description of problem: When an error occurs while building a dockerfile, the output looks like: ERROR: logging before flag.Parse: F0401 21:06:20.657618 1 helpers.go:119] error: build error: error building at step {Env:[OPENSHIFT_BUILD_NAME=src-cache-origin-master-7 OPENSHIFT_BUILD_NAMESPACE=ci VERSION=1.10.3 GOCACHE=/go/.cache GOARM=5 GOPATH=/go GOROOT=/usr/local/go PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/go/bin OPENSHIFT_BUILD_SOURCE=https://github.com/openshift/release.git OPENSHIFT_BUILD_REFERENCE=master OPENSHIFT_BUILD_COMMIT=211cc73fadfdb150cf35d2edd5261898f004023e BUILD_LOGLEVEL=5 CLONEREFS_OPTIONS={"git_user_email":"ci-robot","git_user_name":"ci-robot","log":"/dev/null","refs":[{"org":"openshift","repo":"origin","base_ref":"master","base_sha":"0b751606e93258614555c506f9b3aaffefc57723","path_alias":"github.com/openshift/origin"}],"src_root":"/go"}] Command:add Args:[./clonerefs /clonerefs] Flags:[] Attrs:map[] Message:ADD ./clonerefs /clonerefs Original:ADD ./clonerefs /clonerefs}: error evaluating symlinks "/tmp/build/inputs/clonerefs": lstat /app: no such file or directory The "logging before flag.Parse" and the actual failure to find the /app path hav e been reported as separate bugs, but the actual "error building at step {Env...." is also strange and should be improved. This output looks like it would be useful for debugging (ie loglevel 4+) but it does not seem useful to a user, despite being output by default. Can we make this output more consumable? It seems like the "Message" part is what's really relevant here. How reproducible: Always Steps to Reproduce: 1. Create a dockerfile that will fail due to an error in an ADD statement 2. Run the build 3. Look at the output Actual results: Cluttered/confusing message about what failed Expected results: Clean message about what went wrong in the ADD step
@bparees the error is bubbling up from buildah. Filed bug https://bugzilla.redhat.com/show_bug.cgi?id=1694867 for a true fix. On the openshift/builder side we should capture the error, do we continue to bubble up or should we capture the error, log at debug level, then send a new error? Ex: "dockerfile build failed, see the build log for details."
I think we continue to bubble up because if i have a bad line in my Dockerfile i don't want to have to run at debug loglevels to see what it is.
correction - https://bugzilla.redhat.com/show_bug.cgi?id=1695622
Moving severity to low - this should not block 4.1 from GA release.
PR: https://github.com/openshift/builder/pull/67 This merged before code freeze.
verified in version: $ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.1.0-0.ci-2019-05-14-041751 True False 42h Cluster version is 4.1.0-0.ci-2019-05-14-041751 steps: Check the log $oc new-build -D $'FROM centos:7\nADD no-exist-file .' --docker-image=centos:7 $ oc logs -f build/centos-1 STEP 1: FROM centos@sha256:ca58fe458b8d94bc6e3072f1cfbd334855858e05e1fd633aa07cf7f82b048e66 STEP 2: ADD no-exist-file . error: build error: error building at STEP "ADD no-exist-file .": no files found matching "/tmp/build/inputs/no-exist-file": no such file or directory
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-2019:0758