{"action":"opened","issue":{"url":"https://api.github.com/repos/openshift/origin/issues/6750","labels_url":"https://api.github.com/repos/openshift/origin/issues/6750/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin/issues/6750/comments","events_url":"https://api.github.com/repos/openshift/origin/issues/6750/events","html_url":"https://github.com/openshift/origin/issues/6750","id":127798696,"number":6750,"title":"oc start-build is not giving error when using --from-build against binary build","user":{"login":"GrahamDumpleton","id":507637,"avatar_url":"https://avatars.githubusercontent.com/u/507637?v=3","gravatar_id":"","url":"https://api.github.com/users/GrahamDumpleton","html_url":"https://github.com/GrahamDumpleton","followers_url":"https://api.github.com/users/GrahamDumpleton/followers","following_url":"https://api.github.com/users/GrahamDumpleton/following{/other_user}","gists_url":"https://api.github.com/users/GrahamDumpleton/gists{/gist_id}","starred_url":"https://api.github.com/users/GrahamDumpleton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrahamDumpleton/subscriptions","organizations_url":"https://api.github.com/users/GrahamDumpleton/orgs","repos_url":"https://api.github.com/users/GrahamDumpleton/repos","events_url":"https://api.github.com/users/GrahamDumpleton/events{/privacy}","received_events_url":"https://api.github.com/users/GrahamDumpleton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-20T22:25:15Z","updated_at":"2016-01-20T22:25:15Z","closed_at":null,"body":"Bringing this over from aos-devel. The summary from there seems to be that underlying issues are:\r\n\r\n1 - ``oc start-build --from-build`` when referencing a prior build that used ``--from-dir`` should error and not try and build anything.\r\n2 - There should be a timeout on how long builder will wait for source code injected due to ``--from-dir``.\r\n\r\nSteps to illustrate issue.\r\n\r\n1 - First up I am loading an image stream. I could have avoided this by using a different example, but it is what I was working with and where problem arose so was easier to to go with it.\r\n\r\n```\r\n    oc create -f https://raw.githubusercontent.com/GrahamDumpleton/s2i-lektor/master/lektor.json\r\n```\r\n\r\nThis is going to load an image stream for a custom S2I builder called 'lektor'.\r\n\r\n2 - Create an application using the custom S2I builder called 'lektor'. Am using a Git repository URL as input source for the S2I builder.\r\n\r\n```\r\n    oc new-app lektor:1.1~https://github.com/GrahamDumpleton/lektor-empty-site.git --name blog\r\n    oc expose service blog\r\n```\r\n\r\nThis will create the working application and expose it.\r\n\r\nIt will have created a build configuration definition for 'blog'. It will create an initial build called 'blog-1'.\r\n\r\n3 - Now start a new build using 'oc start-build' using '--from-build', referring to 'blog-1'. Because haven't changed anything, we didn't need to use '--from-build' against a build, and could have just referred to the 'blog' build configuration, but just want to show it will actually work.\r\n\r\n```\r\n    oc start-build --from-build blog-1\r\n```\r\n\r\nThis should create a new build called 'blog-2'.\r\n\r\n4 - Checkout the Git repository we used as input to the S2I builder.\r\n\r\n```\r\n    git clone https://github.com/GrahamDumpleton/lektor-empty-site.git\r\n```\r\n\r\n5 - Trigger a new build but have it use the source files from the Git checkout. Presuming your are in the top directory of the Git repository use:\r\n\r\n```\r\n    oc start-build blog --from-dir .\r\n```\r\n\r\nThis works and if you had changed a file such as:\r\n\r\n```\r\n   content/contents.lr\r\n```\r\n\r\nyou would see the changes in the site when deployed.\r\n\r\nThis should create a new build called 'blog-3'.\r\n\r\n6 - Trigger a new build using '--from-build' and have it refer to the build using '--from-dir'.\r\n\r\n```\r\n    oc start-build --from-build blog-3 --follow\r\n```\r\n\r\nThis never finishes building and appears to hang (still not stopped after many hours). The last line being:\r\n\r\n```\r\nI0119 18:45:53.425309       1 source.go:118] Receiving source from STDIN as archive\r\n```\r\n\r\nThe full logs show:\r\n\r\n```\r\n$ oc start-build --from-build blog-3 --follow\r\nblog-4\r\nI0119 18:45:53.390962       1 sti.go:163] The value of ALLOWED_UIDS is [1-]\r\nI0119 18:45:53.394060       1 cfg.go:44] Locating docker auth for image docker.io/grahamdumpleton/s2i-lektor@sha256:a95cedcb2cd9d42b882ad7b276ffbbbbe82acfc57ab8a695043e2083590b3dda and type PULL_DOCKERCFG_PATH\r\nI0119 18:45:53.394443       1 cfg.go:52] Problem accessing /root/.docker/config.json: stat /root/.docker/config.json: no such file or directory\r\nI0119 18:45:53.394468       1 cfg.go:44] Locating docker auth for image 172.30.137.21:5000/start-build-tests/blog:latest and type PUSH_DOCKERCFG_PATH\r\nI0119 18:45:53.394657       1 cfg.go:66] Using serviceaccount user for Docker authentication for image 172.30.137.21:5000/start-build-tests/blog:latest\r\nI0119 18:45:53.399790       1 docker.go:213] Image docker.io/grahamdumpleton/s2i-lektor@sha256:a95cedcb2cd9d42b882ad7b276ffbbbbe82acfc57ab8a695043e2083590b3dda available locally\r\nI0119 18:45:53.399883       1 sti.go:185] Creating a new S2I builder with build config: \"Builder Name:\\t\\tApache/mod_wsgi (Python 2.7)\\nBuilder Image:\\t\\tdocker.io/grahamdumpleton/s2i-lektor@sha256:a95cedcb2cd9d42b882ad7b276ffbbbbe82acfc57ab8a695043e2083590b3dda\\nSource:\\t\\t\\tfile:///tmp/s2i-build679436057/upload/src#d6a6170e37271d0b99470dcf99d5b6402cee4fad\\nOutput Image Tag:\\t172.30.137.21:5000/start-build-tests/blog:latest\\nEnvironment:\\t\\tOPENSHIFT_BUILD_NAME=blog-4,OPENSHIFT_BUILD_NAMESPACE=start-build-tests\\nIncremental Build:\\tdisabled\\nRemove Old Build:\\tdisabled\\nForce Pull:\\t\\tdisabled\\nQuiet:\\t\\t\\tdisabled\\nLayered Build:\\t\\tdisabled\\nWorkdir:\\t\\t/tmp/s2i-build679436057\\nDocker NetworkMode:\\tcontainer:dacb7e57f7f9456373c61fbe1d59194c389e0cccca2aa636f5c381aece809df6\\nDocker Endpoint:\\tunix:///var/run/docker.sock\\n\"\r\nI0119 18:45:53.410366       1 docker.go:213] Image docker.io/grahamdumpleton/s2i-lektor@sha256:a95cedcb2cd9d42b882ad7b276ffbbbbe82acfc57ab8a695043e2083590b3dda available locally\r\nI0119 18:45:53.422429       1 sti.go:136] Preparing to build 172.30.137.21:5000/start-build-tests/blog:latest\r\nI0119 18:45:53.425309       1 source.go:118] Receiving source from STDIN as archive\r\n```"}}