[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: imageChange build trigger's and the internal registry



----- Original Message -----
> From: "Brenton Leanhardt" <bleanhar redhat com>
> To: "Ben Parees" <bparees redhat com>
> Cc: "Openshift Dev" <dev lists openshift redhat com>
> Sent: Wednesday, February 18, 2015 6:42:46 PM
> Subject: Re: imageChange build trigger's and the internal registry
> 
> +++ Ben Parees [18/02/15 18:13 -0500]:
> >
> >----- Original Message -----
> >> From: "Brenton Leanhardt" <bleanhar redhat com>
> >> To: "Ben Parees" <bparees redhat com>
> >> Cc: "Openshift Dev" <dev lists openshift redhat com>
> >> Sent: Wednesday, February 18, 2015 5:54:01 PM
> >> Subject: Re: imageChange build trigger's and the internal registry
> >>
> >> +++ Ben Parees [18/02/15 16:43 -0500]:
> >> >
> >> >----- Original Message -----
> >> >> From: "Brenton Leanhardt" <bleanhar redhat com>
> >> >> To: "Ben Parees" <bparees redhat com>
> >> >> Cc: "Openshift Dev" <dev lists openshift redhat com>
> >> >> Sent: Wednesday, February 18, 2015 4:32:13 PM
> >> >> Subject: Re: imageChange build trigger's and the internal registry
> >> >>
> >> >> +++ Brenton Leanhardt [18/02/15 16:22 -0500]:
> >> >> >+++ Ben Parees [18/02/15 16:01 -0500]:
> >> >> >>The lack of a BaseImage on your BuildConfig is part(all?) of the
> >> >> >>problem.
> >> >> >>the BaseImage field on a DockerBuildStrategy has to match to the
> >> >> >>"image"
> >> >> >>field on the image change trigger, and will be replaced with the pull
> >> >> >>spec
> >> >> >>computed from the imageRepo.
> >> >> >
> >> >> >I've attached my build config.  I _think_ I have the BaseImage wired
> >> >> >up correctly but it's still not working.
> >> >>
> >> >> I see the FROM line being replaced with the BaseImage:
> >> >> https://github.com/openshift/origin/blob/master/pkg/build/builder/docker.go#L157
> >> >>
> >> >> How is it supposed to know what registry to pull from though?
> >> >
> >> >that's all supposed to be ImageRepository magic...   by default it
> >> >assumes
> >> >the local docker-registry service i believe.  Otherwise you can specify
> >> >the
> >> >repository in the ImageRepo definition.
> >>
> >> I looked through the ImageChangeController code and I confirmed that
> >> the build is being created correctly:
> >>
> >>  17:23:44.456478   55989 generate.go:34] Substituting
> >>  172.30.17.215:5001/ose3/ose-base:211c76c5ba1506641425d5bfd56adb12f672cbf7203bf33b9ea5560b06f0d028
> >>  for ose3/ose-base
> >>
> >> I can even 'docker pull' that image on my Node.  I'm confused I'm not
> >> seeing that image url in my build log when it outputs the FROM line.
> >> I'll keep digging in to this tomorrow.
> >
> >when you get a chance run "osc get build -n <namespace> <buildid> -o json"
> >
> >you should see the BaseImage field containing the substituted value, it
> >would be good to confirm.
> 
> Yeah, I checked that too.  It has the correct 172.30.17.215:5001 url
> in there.

hm, so the dockerfile isn't being rewritten correctly.  Any chance you have an old origin-docker-builder image that might be missing that logic?  

if you're in a position to do so, you might run hack/build-images.sh on your host because we currently are working through some issues w/ not always getting the right images pushed to dockerhub.  it's possible what's out there isn't correct.


> 
> >
> >>
> >> >
> >> >
> >> >>
> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>Ben Parees | OpenShift
> >> >> >>
> >> >> >>----- Original Message -----
> >> >> >>>From: "Brenton Leanhardt" <bleanhar redhat com>
> >> >> >>>To: "Clayton Coleman" <ccoleman redhat com>
> >> >> >>>Cc: "Openshift Dev" <dev lists openshift redhat com>
> >> >> >>>Sent: Wednesday, February 18, 2015 3:35:56 PM
> >> >> >>>Subject: Re: imageChange build trigger's and the internal registry
> >> >> >>>
> >> >> >>>+++ Clayton Coleman [18/02/15 15:30 -0500]:
> >> >> >>>>Can you paste your build config?
> >> >> >>>
> >> >> >>>It was mostly created with 'ex generate' and I made some minor
> >> >> >>>tweaks.
> >> >> >>>Below the only changes I made were to remove the git url hostname:
> >> >> >>>
> >> >> >>># osc describe bc ose-base
> >> >> >>>Name:                   ose-base
> >> >> >>>Annotations:            <none>
> >> >> >>>Created:                2015-02-18 15:03:39 -0500 EST
> >> >> >>>Strategy:               Docker
> >> >> >>>No Cache:               yes
> >> >> >>>BaseImage:              <none>
> >> >> >>>Source Type:            Git
> >> >> >>>URL:
> >> >> >>>http://<snipped>/git/users/bleanhar/ose
> >> >> >>>Ref:                    osebuild
> >> >> >>>Output to:              ose-base
> >> >> >>>Output Spec:            <none>
> >> >> >>>Webhook Github:
> >> >> >>>localhost/osapi/v1beta1/buildConfigHooks/ose-base/DfI4Ka2eL5cwpZ-cus6A/github
> >> >> >>>Webhook Generic:
> >> >> >>>localhost/osapi/v1beta1/buildConfigHooks/ose-base/ydpu3GA0PGqFoG5a1Rqb/generic
> >> >> >>>
> >> >> >>># osc describe bc ose
> >> >> >>>Name:                           ose
> >> >> >>>Annotations:                    <none>
> >> >> >>>Created:                        2015-02-18 15:04:05 -0500 EST
> >> >> >>>Strategy:                       Docker
> >> >> >>>No Cache:                       yes
> >> >> >>>BaseImage:                      <none>
> >> >> >>>Source Type:                    Git
> >> >> >>>URL:
> >> >> >>>http://<snipped>/git/users/bleanhar/ose
> >> >> >>>Ref:                            osebuild
> >> >> >>>Output to:                      ose
> >> >> >>>Output Spec:                    <none>
> >> >> >>>Webhook Generic:
> >> >> >>>localhost/osapi/v1beta1/buildConfigHooks/ose/ydpu3GA0PGqFoG5a1Rqb/generic
> >> >> >>>Webhook Github:
> >> >> >>>localhost/osapi/v1beta1/buildConfigHooks/ose/DfI4Ka2eL5cwpZ-cus6A/github
> >> >> >>>Image Repository Trigger:       ose-base
> >> >> >>>- Tag:                          latest
> >> >> >>>- Image:                        ose3/ose-base
> >> >> >>>- LastTriggeredImageID:
> >> >> >>>  0975d5a7c29c921838fcc56dd154b94dc895b79c8417f720d818767652dbf779
> >> >> >>>
> >> >> >>>>
> >> >> >>>>
> >> >> >>>>> On Feb 18, 2015, at 2:45 PM, Brenton Leanhardt
> >> >> >>>>> <bleanhar redhat com>
> >> >> >>>>> wrote:
> >> >> >>>>>
> >> >> >>>>> I have a working imageChange build trigger.  However, it seems
> >> >> >>>>> like
> >> >> >>>>> the resulting build is trying to pull from the docker hub:
> >> >> >>>>>
> >> >> >>>>> Build logs:
> >> >> >>>>> 2015-02-18T19:35:59.534994177Z Step 0 : FROM ose3/ose-base
> >> >> >>>>> 2015-02-18T19:35:59.534994177Z Pulling repository ose3/ose-base
> >> >> >>>>> 2015-02-18T19:36:00.022455304Z 2015/02/18 14:36:00 Build error:
> >> >> >>>>> Error:
> >> >> >>>>> image ose3/ose-base not found
> >> >> >>>>>
> >> >> >>>>> Curling my registry directly shows the image is there:
> >> >> >>>>>
> >> >> >>>>> curl
> >> >> >>>>> http://172.30.17.215:5001/v1/repositories/ose3/ose-base/tags/latest
> >> >> >>>>> "8a864801852bcee8d120b4fe815b78cb41ba3632ffaa0edd0dd213558464f60b
> >> >> >>>>>
> >> >> >>>>> How is the resulting build supposed to find that image?
> >> >> >>>>>
> >> >> >>>>> --Brenton
> >> >> >>>>>
> >> >> >>>>> _______________________________________________
> >> >> >>>>> dev mailing list
> >> >> >>>>> dev lists openshift redhat com
> >> >> >>>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
> >> >> >>>
> >> >> >>>_______________________________________________
> >> >> >>>dev mailing list
> >> >> >>>dev lists openshift redhat com
> >> >> >>>http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
> >> >> >>>
> >> >>
> >> >>
> >> >> >_______________________________________________
> >> >> >dev mailing list
> >> >> >dev lists openshift redhat com
> >> >> >http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
> >> >>
> >> >>
> >>
> 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]