Bug 1245609
| Summary: | Custom build with imageStreamImage in buildConfig failed | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Anping Li <anli> |
| Component: | Build | Assignee: | Rodolfo Carvalho <rcarvalh> |
| Status: | CLOSED NOTABUG | QA Contact: | Gaoyun Pei <gpei> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.0.0 | CC: | anli, bparees, libra-bugs |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-07-23 02:32:58 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Anping Li
2015-07-22 11:34:25 UTC
Do you have an ImageStreamImage defined? creating an imagestream doesn't get you an imagestreamimage. please share the exact definition of the buildconfig you are using and the output of "oc get imagestreamimage" for the project you are referencing from your buildconfig. also "oc describe build <buildid>" (In reply to Ben Parees from comment #1) > Do you have an ImageStreamImage defined? creating an imagestream doesn't > get you an imagestreamimage. > Yes, The imagestreamimage had been defined. [anli@master ~]$ oc get is NAME DOCKER REPO TAGS UPDATED origin-custom-docker-builder anli/origin-custom-docker-builder latest,liap 1 seconds ago origin-ruby-sample > please share the exact definition of the buildconfig you are using and the > output of "oc get imagestreamimage" for the project you are referencing from > your buildconfig. > [anli@master ~]$ oc get imagestreamimage origin-custom-docker-builder@d44f004c9195488f33cf5aedeb958758d66b1dcfc9c169e8a304111bb035d3ad NAME DOCKER REF UPDATED IMAGENAME origin-custom-docker-builder@d44f004 anli/origin-custom-docker-builder:liap 3 minutes ago d44f004c9195488f33cf5aedeb958758d66b1dcfc9c169e8a304111bb035d3ad > also "oc describe build <buildid>" [anli@master ~]$ oc get builds NAME TYPE STATUS POD ruby-sample-build-1 Custom Complete ruby-sample-build-1-build [anli@master ~]$ oc describe build ruby-sample-build-1 Name: ruby-sample-build-1 Created: 42 seconds ago Labels: buildconfig=ruby-sample-build,name=ruby-sample-build,template=application-template-custombuild Build Config: ruby-sample-build Status: Complete Started: 2015-07-23 09:13:24 +0800 CST Finished: 2015-07-23 09:13:24 +0800 CST Duration: 0 Build Pod: ruby-sample-build-1-build Strategy: Custom Image Reference: DockerImage anli/origin-custom-docker-builder:liap Expose Docker Socket: yes Environment: OPENSHIFT_CUSTOM_BUILD_BASE_IMAGE=anli/origin-custom-docker-builder:liap Source Type: Git URL: git://github.com/openshift/ruby-hello-world.git Output to: ImageStreamTag origin-ruby-sample:latest Push Secret: builder-dockercfg-w2ecg Events: FirstSeen LastSeen Count From SubobjectPath Reason Message Thu, 23 Jul 2015 09:13:00 +0800 Thu, 23 Jul 2015 09:13:00 +0800 1 {scheduler } scheduled Successfully assigned ruby-sample-build-1-build to minion2.cluster.local Thu, 23 Jul 2015 09:13:00 +0800 Thu, 23 Jul 2015 09:13:00 +0800 1 {kubelet minion2.cluster.local} implicitly required container POD pulled Pod container image "registry.access.redhat.com/openshift3/ose-pod:v3.0.1.0" already present on machine Thu, 23 Jul 2015 09:13:00 +0800 Thu, 23 Jul 2015 09:13:00 +0800 1 {kubelet minion2.cluster.local} implicitly required container POD created Created with docker id f8b501eac37f Thu, 23 Jul 2015 09:13:00 +0800 Thu, 23 Jul 2015 09:13:00 +0800 1 {kubelet minion2.cluster.local} implicitly required container POD started Started with docker id f8b501eac37f Thu, 23 Jul 2015 09:13:23 +0800 Thu, 23 Jul 2015 09:13:23 +0800 1 {kubelet minion2.cluster.local} spec.containers{custom-build}pulled Successfully pulled image "anli/origin-custom-docker-builder:liap" Thu, 23 Jul 2015 09:13:24 +0800 Thu, 23 Jul 2015 09:13:24 +0800 1 {kubelet minion2.cluster.local} spec.containers{custom-build}created Created with docker id db049ae0031d Thu, 23 Jul 2015 09:13:24 +0800 Thu, 23 Jul 2015 09:13:24 +0800 1 {kubelet minion2.cluster.local} spec.containers{custom-build}started Started with docker id db049ae0031d Thu, 23 Jul 2015 09:13:30 +0800 Thu, 23 Jul 2015 09:13:30 +0800 1 {kubelet minion2.cluster.local} implicitly required container POD killing Killing with docker id f8b501eac37f Following comment 2 [anli@master ~]$ oc get builds NAME TYPE STATUS POD ruby-sample-build-1 Custom Complete ruby-sample-build-1-build [anli@master ~]$ oc get pods NAME READY STATUS RESTARTS AGE database-1-ohojc 1/1 Running 0 8m ruby-sample-build-1-build 0/1 ExitCode:0 0 3m [anli@master ~]$ oc logs ruby-sample-build-1-build [anli@master ~]$ The question then is, what is your custom builder image doing? based on your results: 1) it's exiting with a successful (zero) return code 2) it's not pushing an image anywhere it's the responsibility of the custom builder image to report success/failure (and output any log info you want to stdout) and push the result image to the registry, assuming that's what you want it to do. for example see: https://github.com/openshift/origin/tree/master/images/builder/docker/custom-docker-builder Yes, you are right. The image was started from /bin/bash rather than /bin/src/build.sh. So it should not a bug. |