Skip to content

Custom S2I image fails to pull from Docker Hub #9491

Closed

Description

@double16

I have created a custom S2I builder for Grails 2.x applications. When I try to use it, the sha256 value is found correctly, yet OpenShift cannot pull it.

Version

OpenShift Origin via Vagrant box. v1.3.0-alpha.1-31-g81aecc8

Steps To Reproduce
  1. oc new-app docker.io/pdouble16/openshift-s2i-grails2:0.1.2~https://bitbucket.org/double16/cukebooks.git
  2. Review build logs
Current Result
I0622 17:02:34.992579       1 builder.go:53] $BUILD env var is {"kind":"Build","apiVersion":"v1","metadata":{"name":"cukebooks-2","namespace":"cukebooks","selfLink":"/oapi/v1/namespaces/cukebooks/builds/cukebooks-2","uid":"1c47bdb4-389b-11e6-a890-525400b263eb","resourceVersion":"7194","creationTimestamp":"2016-06-22T17:02:32Z","labels":{"app":"cukebooks","buildconfig":"cukebooks","openshift.io/build-config.name":"cukebooks","openshift.io/build.start-policy":"Serial"},"annotations":{"openshift.io/build-config.name":"cukebooks","openshift.io/build.number":"2"}},"spec":{"serviceAccount":"builder","source":{"type":"Git","git":{"uri":"https://bitbucket.org/double16/cukebooks.git"},"secrets":[]},"strategy":{"type":"Source","sourceStrategy":{"from":{"kind":"DockerImage","name":"docker.io/pdouble16/openshift-s2i-grails2@sha256:45ff668485c8829a74e23a2886474768338021953b028267deb99a88ba2a4de7"},"env":[{"name":"BUILD_LOGLEVEL","value":"5"}]}},"output":{"to":{"kind":"DockerImage","name":"172.30.196.23:5000/cukebooks/cukebooks:latest"},"pushSecret":{"name":"builder-dockercfg-zj4vr"}},"resources":{},"postCommit":{}},"status":{"phase":"New","outputDockerImageReference":"172.30.196.23:5000/cukebooks/cukebooks:latest","config":{"kind":"BuildConfig","namespace":"cukebooks","name":"cukebooks"}}}

I0622 17:02:35.006528       1 builder.go:61] Build: &api.Build{TypeMeta:unversioned.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:api.ObjectMeta{Name:"cukebooks-2", GenerateName:"", Namespace:"cukebooks", SelfLink:"/oapi/v1/namespaces/cukebooks/builds/cukebooks-2", UID:"1c47bdb4-389b-11e6-a890-525400b263eb", ResourceVersion:"7194", Generation:0, CreationTimestamp:unversioned.Time{Time:time.Time{sec:63602211752, nsec:0, loc:(*time.Location)(0x5f7f6c0)}}, DeletionTimestamp:(*unversioned.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"buildconfig":"cukebooks", "openshift.io/build-config.name":"cukebooks", "openshift.io/build.start-policy":"Serial", "app":"cukebooks"}, Annotations:map[string]string{"openshift.io/build-config.name":"cukebooks", "openshift.io/build.number":"2"}}, Spec:api.BuildSpec{ServiceAccount:"builder", Source:api.BuildSource{Binary:(*api.BinaryBuildSource)(nil), Dockerfile:(*string)(nil), Git:(*api.GitBuildSource)(0xc8204b9e60), Images:[]api.ImageSource(nil), ContextDir:"", SourceSecret:(*api.LocalObjectReference)(nil), Secrets:[]api.SecretBuildSource{}}, Revision:(*api.SourceRevision)(nil), Strategy:api.BuildStrategy{DockerStrategy:(*api.DockerBuildStrategy)(nil), SourceStrategy:(*api.SourceBuildStrategy)(0xc8200d80b0), CustomStrategy:(*api.CustomBuildStrategy)(nil), JenkinsPipelineStrategy:(*api.JenkinsPipelineBuildStrategy)(nil)}, Output:api.BuildOutput{To:(*api.ObjectReference)(0xc8204fdf80), PushSecret:(*api.LocalObjectReference)(0xc82022c9c0)}, Resources:api.ResourceRequirements{Limits:api.ResourceList(nil), Requests:api.ResourceList(nil)}, PostCommit:api.BuildPostCommitSpec{Command:[]string(nil), Args:[]string(nil), Script:""}, CompletionDeadlineSeconds:(*int64)(nil)}, Status:api.BuildStatus{Phase:"New", Cancelled:false, Reason:"", Message:"", StartTimestamp:(*unversioned.Time)(nil), CompletionTimestamp:(*unversioned.Time)(nil), Duration:0, OutputDockerImageReference:"172.30.196.23:5000/cukebooks/cukebooks:latest", Config:(*api.ObjectReference)(0xc8202500e0)}}

warning: OpenShift server version "v1.3.0-alpha.1-31-g81aecc8" differs from this image "v1.3.0-alpha.1"
I0622 17:02:35.007723       1 builder.go:153] Running build with cgroup limits: api.CGroupLimits{MemoryLimitBytes:92233720368547, CPUShares:2, CPUPeriod:100000, CPUQuota:-1, MemorySwap:92233720368547}
I0622 17:02:35.165510       1 glog.go:70] With force pull false, setting policies to [if-not-present]
The value of ALLOWED_UIDS is [1-]
The value of DROP_CAPS is [KILL,MKNOD,SETGID,SETUID,SYS_CHROOT]
I0622 17:02:35.167798       1 cfg.go:45] Locating docker auth for image docker.io/pdouble16/openshift-s2i-grails2@sha256:45ff668485c8829a74e23a2886474768338021953b028267deb99a88ba2a4de7 and type PULL_DOCKERCFG_PATH
I0622 17:02:35.167961       1 cfg.go:111] Using Docker authentication configuration in '/root/.docker/config.json'
I0622 17:02:35.170769       1 cfg.go:57] Problem accessing /root/.docker/config.json: stat /root/.docker/config.json: no such file or directory
I0622 17:02:35.171519       1 cfg.go:45] Locating docker auth for image 172.30.196.23:5000/cukebooks/cukebooks:latest and type PUSH_DOCKERCFG_PATH
I0622 17:02:35.171582       1 cfg.go:111] Using Docker authentication configuration in '/var/run/secrets/openshift.io/push/.dockercfg'
I0622 17:02:35.171858       1 cfg.go:83] Using serviceaccount user for Docker authentication for image 172.30.196.23:5000/cukebooks/cukebooks:latest
I0622 17:02:35.181667       1 docker.go:368] error inspecting image docker.io/pdouble16/openshift-s2i-grails2@sha256:45ff668485c8829a74e23a2886474768338021953b028267deb99a88ba2a4de7: no such image
I0622 17:02:35.181785       1 docker.go:355] Image "docker.io/pdouble16/openshift-s2i-grails2@sha256:45ff668485c8829a74e23a2886474768338021953b028267deb99a88ba2a4de7" not available locally, pulling ...
I0622 17:02:35.181802       1 docker.go:377] Pulling Docker image docker.io/pdouble16/openshift-s2i-grails2@sha256:45ff668485c8829a74e23a2886474768338021953b028267deb99a88ba2a4de7 ...
I0622 17:02:37.759920       1 docker.go:380] An error was received from the PullImage call: manifest unknown: manifest unknown
Creating a new S2I builder with build config: "Builder Image:\t\t\tdocker.io/pdouble16/openshift-s2i-grails2@sha256:45ff668485c8829a74e23a2886474768338021953b028267deb99a88ba2a4de7\nSource:\t\t\t\tfile:///tmp/s2i-build209577050/upload/src\nOutput Image Tag:\t\tcukebooks/cukebooks-2:637d8c16\nEnvironment:\t\t\tOPENSHIFT_BUILD_NAME=cukebooks-2,OPENSHIFT_BUILD_NAMESPACE=cukebooks,OPENSHIFT_BUILD_SOURCE=https://bitbucket.org/double16/cukebooks.git,BUILD_LOGLEVEL=5\nIncremental Build:\t\tdisabled\nRemove Old Build:\t\tdisabled\nBuilder Pull Policy:\t\tif-not-present\nPrevious Image Pull Policy:\talways\nQuiet:\t\t\t\tdisabled\nLayered Build:\t\t\tdisabled\nWorkdir:\t\t\t/tmp/s2i-build209577050\nDocker NetworkMode:\t\tcontainer:814423caf7ce7d712592b06ee531df045529e1b6fa4834383280d77f324cb37b\nDocker Endpoint:\t\tunix:///var/run/docker.sock\n"
I0622 17:02:37.771508       1 docker.go:368] error inspecting image docker.io/pdouble16/openshift-s2i-grails2@sha256:45ff668485c8829a74e23a2886474768338021953b028267deb99a88ba2a4de7: no such image
I0622 17:02:37.771533       1 docker.go:355] Image "docker.io/pdouble16/openshift-s2i-grails2@sha256:45ff668485c8829a74e23a2886474768338021953b028267deb99a88ba2a4de7" not available locally, pulling ...
I0622 17:02:37.771543       1 docker.go:377] Pulling Docker image docker.io/pdouble16/openshift-s2i-grails2@sha256:45ff668485c8829a74e23a2886474768338021953b028267deb99a88ba2a4de7 ...
I0622 17:02:40.961278       1 docker.go:380] An error was received from the PullImage call: manifest unknown: manifest unknown
F0622 17:02:40.965598       1 helpers.go:108] error: build error: unable to get docker.io/pdouble16/openshift-s2i-grails2@sha256:45ff668485c8829a74e23a2886474768338021953b028267deb99a88ba2a4de7
Expected Result

Project builds and deploys, listening to port 8080.

Additional Information
$ oadm diagnostics
[Note] Determining if client configuration exists for client/cluster diagnostics
[Note] No client configuration specified; skipping client and cluster diagnostics.
[Note] Summary of diagnostics execution (version v1.3.0-alpha.1-31-g81aecc8):
[Note] Completed with no errors or warnings seen.

cukebooks.json.txt

Activity

  1. double16 commented on Jun 22, 2016

    @double16
    Author

    If I pull the image manually (inside the VM):

    $ docker pull docker.io/pdouble16/openshift-s2i-grails2:0.1.2
    ...
    Digest: sha256:45ff668485c8829a74e23a2886474768338021953b028267deb99a88ba2a4de7
    Status: Downloaded newer image for docker.io/pdouble16/openshift-s2i-grails2:0.1.2
    

    So the digest looks valid.

  2. double16 commented on Jun 22, 2016

    @double16
    Author
  3. assigned and unassigned on Jun 23, 2016
  4. mfojtik commented on Jun 23, 2016

    @mfojtik
    Contributor

    @double16 what version of docker you have?

  5. mfojtik commented on Jun 23, 2016

    @mfojtik
    Contributor

    @double16 and what version of docker you used to push the image to hub?

  6. miminar commented on Jun 23, 2016

    @miminar

    @double16 you need to rebuild your image using docker1.9 and push it to dockerhub in order to consume it with pre- 1.3.0 cluster. The 1.3.0 release will support image manifest schema v2.

  7. double16 commented on Jun 23, 2016

    @double16
    Author

    @mfojtik I'm using the Docker Hub automated build to publish the image. I've tried with docker versions 1.10.3, 1.11.2 and whatever comes with the Vagrant box for 1.3.0.alpha.1.

    @miminar Thanks, I'll push these to a local registry and see how it goes. Any idea which pre-release for 1.3.0 will have v2 support?

  8. double16 commented on Jun 23, 2016

    @double16
    Author

    Verified building and pushing with docker 1.9 fixes the issue. Feel free to close if this is captured in another issue.

  9. miminar commented on Jun 24, 2016

    @miminar

    @miminar Thanks, I'll push these to a local registry and see how it goes. Any idea which pre-release for 1.3.0 will have v2 support?

    Personally, I hope the #8938 will be merged today. So very possibly the next alpha/beta release will have it.

    Thanks for verifying and letting us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions