Description of problem: S2I Build fails with "Failed to fetch source for build" when git repository contains a broken link on OCP 3.5. Version-Release number of selected component (if applicable): 3.5 How reproducible: on a git projet create a link (ln -s) on an existing file f, delete the file f Or use the sample project at: https://github.com/erreff/carsten Steps to Reproduce: Create a project with a broken symbolic link. As an example you can use this project against a PHP template: https://github.com/erreff/carsten Actual results: Cloning "https://github.com/erreff/carsten" ... Commit: 352d2b6c173d63b7a5eb859ad6a1924a4cd506fe (add bad link) Author: root <root.extra.laposte.fr> Date: Tue Oct 24 18:07:29 2017 +0200 error: build error: open /tmp/s2i-build430207290/upload/src/contextdir/badlink: no such file or directory Expected results: In OCP 3.4, the build process is not stopped in case a symbolic link is broken. Cloning "https://github.com/erreff/carsten" ... Commit: 352d2b6c173d63b7a5eb859ad6a1924a4cd506fe (add bad link) Author: root <root.extra.laposte.fr> Date: Tue Oct 24 18:07:29 2017 +0200 ---> Installing application source... chgrp: cannot dereference './contextdir/badlink': No such file or directory chmod: cannot operate on dangling symlink './contextdir/badlink' Pushing image 172.30.1.1:5000/demo/demophp:latest ... Pushed 0/5 layers, 20% complete Pushed 1/5 layers, 21% complete Pushed 2/5 layers, 41% complete Pushed 3/5 layers, 71% complete Pushed 4/5 layers, 100% complete Pushed 5/5 layers, 100% complete Push successful $ oc get pods NAME READY STATUS RESTARTS AGE demophp-1-0lngh 1/1 Running 0 3m demophp-1-build 0/1 Completed 0 4m Additional info:
https://github.com/openshift/source-to-image/pull/820 https://github.com/openshift/origin/pull/17057
verified in oc v3.5.5.31.41 kubernetes v1.5.2+43a9be4 steps: # oc new-app openshift/php~https://github.com/erreff/carsten -n wewang # oc get builds -n wewang NAME TYPE FROM STATUS STARTED DURATION carsten-1 Source Git@352d2b6 Complete About a minute ago 36s [root@host-8-241-68 ~]# oc logs bc/carsten -n wewang Cloning "https://github.com/erreff/carsten" ... Pushed 4/6 layers, 74% complete Pushed 5/6 layers, 100% complete Pushed 6/6 layers, 100% complete Push successful # oc get pods NAME READY STATUS RESTARTS AGE carsten-1-build 0/1 Completed 0 9m carsten-1-jhk2k 1/1 Running 0 8m
Yes, it's better to have related docs text
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/RHSA-2017:3188