Hello there,
We have been using GitLab with modern Kubernetes cluster integration, where “containerd” runtime is used. Now we experience issues with pulling images from GitLab registry, both for “crictl” and “ctr”:
# crictl --debug pull env-5903682.madrid.central.jelastic.team:8443/root/gitlab-k8s-cicd-demo/hwservice:master-5
DEBU[0000] get image connection
DEBU[0000] connect using endpoint 'unix:///run/containerd/containerd.sock' with '2s' timeout
DEBU[0000] connected successfully using endpoint: unix:///run/containerd/containerd.sock
DEBU[0000] PullImageRequest: &PullImageRequest{Image:&ImageSpec{Image:env-5903682.madrid.central.jelastic.team:8443/root/gitlab-k8s-cicd-demo/hwservice:master-5,Annotations:map[string]string{},},Auth:nil,SandboxConfig:nil,}
DEBU[0000] PullImageResponse: nil
FATA[0000] pulling image: rpc error: code = NotFound desc = failed to pull and unpack image "env-5903682.madrid.central.jelastic.team:8443/root/gitlab-k8s-cicd-demo/hwservice:master-5": httpReaderSeeker: failed open: content at https://env-5903682.madrid.central.jelastic.team:8443/v2/root/gitlab-k8s-cicd-demo/hwservice/manifests/sha256:40cabd555bb3457607ccb02ba0c7ca5494a900a293eccae63e68f9929ce2b61d not found: not found
# ctr --debug images pull --skip-verify env-5903682.madrid.central.jelastic.team:8443/root/gitlab-k8s-cicd-demo/hwservice:master-5
DEBU[0000] fetching image="env-5903682.madrid.central.jelastic.team:8443/root/gitlab-k8s-cicd-demo/hwservice:master-5"
DEBU[0000] resolving host="env-5903682.madrid.central.jelastic.team:8443"
DEBU[0000] do request host="env-5903682.madrid.central.jelastic.team:8443" request.header.accept="application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, */*" request.header.user-agent=containerd/1.4.6 request.method=HEAD url="https://env-5903682.madrid.central.jelastic.team:8443/v2/root/gitlab-k8s-cicd-demo/hwservice/manifests/master-5"
DEBU[0000] fetch response received host="env-5903682.madrid.central.jelastic.team:8443" response.header.content-length=167 response.header.content-type="application/json; charset=utf-8" response.header.date="Fri, 02 Jul 2021 09:15:56 GMT" response.header.docker-distribution-api-version=registry/2.0 response.header.www-authenticate="Bearer realm=\"https://env-5903682.madrid.central.jelastic.team:4848/jwt/auth\",service=\"container_registry\",scope=\"repository:root/gitlab-k8s-cicd-demo/hwservice:pull\"" response.header.x-content-type-options=nosniff response.status="401 Unauthorized" url="https://env-5903682.madrid.central.jelastic.team:8443/v2/root/gitlab-k8s-cicd-demo/hwservice/manifests/master-5"
DEBU[0000] Unauthorized header="Bearer realm=\"https://env-5903682.madrid.central.jelastic.team:4848/jwt/auth\",service=\"container_registry\",scope=\"repository:root/gitlab-k8s-cicd-demo/hwservice:pull\"" host="env-5903682.madrid.central.jelastic.team:8443"
DEBU[0000] do request host="env-5903682.madrid.central.jelastic.team:8443" request.header.accept="application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, */*" request.header.user-agent=containerd/1.4.6 request.method=HEAD url="https://env-5903682.madrid.central.jelastic.team:8443/v2/root/gitlab-k8s-cicd-demo/hwservice/manifests/master-5"
DEBU[0000] fetch response received host="env-5903682.madrid.central.jelastic.team:8443" response.header.content-length=12400 response.header.content-type=application/vnd.docker.distribution.manifest.v1+prettyjws response.header.date="Fri, 02 Jul 2021 09:15:56 GMT" response.header.docker-content-digest="sha256:40cabd555bb3457607ccb02ba0c7ca5494a900a293eccae63e68f9929ce2b61d" response.header.docker-distribution-api-version=registry/2.0 response.header.etag="\"sha256:40cabd555bb3457607ccb02ba0c7ca5494a900a293eccae63e68f9929ce2b61d\"" response.header.x-content-type-options=nosniff response.status="200 OK" url="https://env-5903682.madrid.central.jelastic.team:8443/v2/root/gitlab-k8s-cicd-demo/hwservice/manifests/master-5"
DEBU[0000] resolved desc.digest="sha256:40cabd555bb3457607ccb02ba0c7ca5494a900a293eccae63e68f9929ce2b61d" host="env-5903682.madrid.central.jelastic.team:8443"
DEBU[0000] fetch schema 1
DEBU[0000] do request digest="sha256:40cabd555bb3457607ccb02ba0c7ca5494a900a293eccae63e68f9929ce2b61d" request.header.accept="application/vnd.docker.distribution.manifest.v1+prettyjws, */*" request.header.user-agent=containerd/1.4.6 request.method=GET url="https://env-5903682.madrid.central.jelastic.team:8443/v2/root/gitlab-k8s-cicd-demo/hwservice/manifests/sha256:40cabd555bb3457607ccb02ba0c7ca5494a900a293eccae63e68f9929ce2b61d"
DEBU[0000] fetch response received digest="sha256:40cabd555bb3457607ccb02ba0c7ca5494a900a293eccae63e68f9929ce2b61d" response.header.content-length=167 response.header.content-type="application/json; charset=utf-8" response.header.date="Fri, 02 Jul 2021 09:15:56 GMT" response.header.docker-distribution-api-version=registry/2.0 response.header.www-authenticate="Bearer realm=\"https://env-5903682.madrid.central.jelastic.team:4848/jwt/auth\",service=\"container_registry\",scope=\"repository:root/gitlab-k8s-cicd-demo/hwservice:pull\"" response.header.x-content-type-options=nosniff response.status="401 Unauthorized" url="https://env-5903682.madrid.central.jelastic.team:8443/v2/root/gitlab-k8s-cicd-demo/hwservice/manifests/sha256:40cabd555bb3457607ccb02ba0c7ca5494a900a293eccae63e68f9929ce2b61d"
DEBU[0000] Unauthorized digest="sha256:40cabd555bb3457607ccb02ba0c7ca5494a900a293eccae63e68f9929ce2b61d" header="Bearer realm=\"https://env-5903682.madrid.central.jelastic.team:4848/jwt/auth\",service=\"container_registry\",scope=\"repository:root/gitlab-k8s-cicd-demo/hwservice:pull\""
DEBU[0000] do request digest="sha256:40cabd555bb3457607ccb02ba0c7ca5494a900a293eccae63e68f9929ce2b61d" request.header.accept="application/vnd.docker.distribution.manifest.v1+prettyjws, */*" request.header.user-agent=containerd/1.4.6 request.method=GET url="https://env-5903682.madrid.central.jelastic.team:8443/v2/root/gitlab-k8s-cicd-demo/hwservice/manifests/sha256:40cabd555bb3457607ccb02ba0c7ca5494a900a293eccae63e68f9929ce2b61d"
DEBU[0000] fetch response received digest="sha256:40cabd555bb3457607ccb02ba0c7ca5494a900a293eccae63e68f9929ce2b61d" response.header.content-length=211 response.header.content-type="application/json; charset=utf-8" response.header.date="Fri, 02 Jul 2021 09:15:57 GMT" response.header.docker-distribution-api-version=registry/2.0 response.header.x-content-type-options=nosniff response.status="404 Not Found" url="https://env-5903682.madrid.central.jelastic.team:8443/v2/root/gitlab-k8s-cicd-demo/hwservice/manifests/sha256:40cabd555bb3457607ccb02ba0c7ca5494a900a293eccae63e68f9929ce2b61d"
ctr: httpReaderSeeker: failed open: content at https://env-5903682.madrid.central.jelastic.team:8443/v2/root/gitlab-k8s-cicd-demo/hwservice/manifests/sha256:40cabd555bb3457607ccb02ba0c7ca5494a900a293eccae63e68f9929ce2b61d not found: not found
At the same time, pulling via “docker” doesn’t cause any issues:
# docker pull env-5903682.madrid.central.jelastic.team:8443/root/gitlab-k8s-cicd-demo/hwservice:master-5
master-5: Pulling from root/gitlab-k8s-cicd-demo/hwservice
df20fa9351a1: Pull complete
60d37dc3360e: Pull complete
bdb33821fbac: Pull complete
c2e82bf56b21: Pull complete
21aadbca6870: Pull complete
f466024ee4b6: Pull complete
Digest: sha256:766f6f13b0c7026003aed6286389aa91524fea989c93fddc1c9270fea08e638c
Status: Downloaded newer image for env-5903682.madrid.central.jelastic.team:8443/root/gitlab-k8s-cicd-demo/hwservice:master-5
env-5903682.madrid.central.jelastic.team:8443/root/gitlab-k8s-cicd-demo/hwservice:master-5
We use a self-signed certificate on GitLab instance — in theory it may be the reason. But, “containerd” and “ctr” have options to ignore the certificate validity, and the error message doesn’t refer it. The Docker client also doesn’t have issues with the self-signed certificate, added to exclusions.
Any help here on how to fix or workaroud the pull issue is highy appreciated.
