Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-19625

Docker remote repository get a wrong schema when the Metadata cache retrieval period is set to 0

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.13.0
    • Component/s: None
    • Labels:
      None

      Description

      Remote docker repository pointing to another artifactory instance and the metadata cache retrieval period set to 0 fetched the wrong manifest version.

       

      For example: Docker pull busybox:2.0.0 image from Artifactory A proxying to Artifactory B's local has the following logs:

      2019-07-12 22:48:36,288 [http-nio-8082-exec-9] [TRACE] (o.a.a.d.r.DockerV2AuthenticationFilter:87) - DockerV2AuthenticationFilter path: /api/docker/docker-test/v2/busybox/manifests/2.0.0

      2019-07-12 22:48:36,316 [http-nio-8082-exec-9] [TRACE] (o.a.a.d.r.v.DockerV2RemoteRepoHandler:239) - Fetching manifest for docker-test:'busybox' '2.0.0'

      2019-07-12 22:48:36,317 [http-nio-8082-exec-9] [DEBUG] (o.a.a.d.r.v.DockerV2RemoteRepoHandler:401) - Fetching docker tag manifest for docker-test:busybox:2.0.0

      2019-07-12 22:48:36,339 [http-nio-8082-exec-9] [TRACE] (o.a.a.d.r.DockerRemoteTokenProvider:80) - Getting token for {service=10.128.0.151:8081, scope=repository:busybox:pull, realm=http://10.128.0.151:8081/artifactory/api/docker/docker-local/v2/token}

      2019-07-12 22:48:36,340 [http-nio-8082-exec-9] [TRACE] (o.a.a.d.r.DockerRemoteTokenProvider:158) - Fetching new token for 'TokenCacheKey{scope='repository:busybox:pull', realm='http://10.128.0.151:8081/artifactory/api/docker/docker-local/v2/token', service='10.128.0.151:8081', repoKey='docker-test'}'

      2019-07-12 22:48:36,341 [http-nio-8082-exec-9] [DEBUG] (o.a.a.d.DockerHttpRepo:114) - Repo has basic auth configured - sending token request with basic auth.

      2019-07-12 22:48:36,342 [http-nio-8082-exec-9] [TRACE] (o.a.a.d.DockerHttpRepo:87) - Requesting token from url 'http://10.128.0.151:8081/artifactory/api/docker/docker-local/v2/token?scope=repository:busybox:pull&service=10.128.0.151:8081'

      2019-07-12 22:48:36,700 [http-nio-8082-exec-9] [INFO ] (o.a.r.HttpRepo      :432) - docker-test downloading http://10.128.0.151:8081/artifactory/docker-local/busybox/2.0.0/manifest.json:properties Unknown content length

      2019-07-12 22:48:36,702 [http-nio-8082-exec-9] [INFO ] (o.a.r.HttpRepo      :445) - docker-test downloaded  http://10.128.0.151:8081/artifactory/docker-local/busybox/2.0.0/manifest.json:properties 460 bytes at 424.09 KB/sec

      2019-07-12 22:48:36,705 [http-nio-8082-exec-9] [TRACE] (o.a.a.d.r.DockerRemoteTokenProvider:80) - Getting token for {service=10.128.0.151:8081, scope=repository:busybox:pull, realm=http://10.128.0.151:8081/artifactory/api/docker/docker-local/v2/token}

      2019-07-12 22:48:36,725 [http-nio-8082-exec-9] [INFO ] (o.a.r.HttpRepo      :432) - docker-test downloading http://10.128.0.151:8081/artifactory/api/docker/docker-local/v2/busybox/manifests/2.0.0 527 bytes

      2019-07-12 22:48:36,764 [http-nio-8082-exec-9] [INFO ] (o.a.r.HttpRepo      :445) - docker-test downloaded  http://10.128.0.151:8081/artifactory/api/docker/docker-local/v2/busybox/manifests/2.0.0 527 bytes at 13.59 KB/sec

      2019-07-12 22:48:36,769 [http-nio-8082-exec-9] [DEBUG] (o.a.a.d.r.v.DockerV2RemoteRepoHandler:498) - Caching resource docker-test/busybox/2.0.0/manifest.json

      2019-07-12 22:48:36,770 [http-nio-8082-exec-9] [DEBUG] (o.a.a.d.r.v.DockerV2RemoteRepoHandler:439) - Using manifest from docker-test/busybox/2.0.0/manifest.json

      2019-07-12 22:48:36,775 [http-nio-8082-exec-9] [TRACE] (o.a.a.d.r.v.DockerV2RemoteRepoHandler:571) - Using handler from cache

      2019-07-12 22:48:36,796 [http-nio-8082-exec-9] [TRACE] (o.a.a.d.r.DockerRemoteTokenProvider:80) - Getting token for {service=10.128.0.151:8081, scope=repository:busybox:pull, realm=http://10.128.0.151:8081/artifactory/api/docker/docker-local/v2/token}

      2019-07-12 22:48:36,832 [http-nio-8082-exec-9] [INFO ] (o.a.r.HttpRepo      :432) - docker-test downloading http://10.128.0.151:8081/artifactory/docker-local/busybox/2.0.0/sha256__e4db68de4ff27c2adfea0c54bbb73a61a42f5b667c326de4d7d5b19ab71c6a3b:properties Unknown content length

      2019-07-12 22:48:36,833 [http-nio-8082-exec-9] [INFO ] (o.a.r.HttpRepo      :445) - docker-test downloaded  http://10.128.0.151:8081/artifactory/docker-local/busybox/2.0.0/sha256__e4db68de4ff27c2adfea0c54bbb73a61a42f5b667c326de4d7d5b19ab71c6a3b:properties 149 bytes at 317.63 KB/sec

      2019-07-12 22:48:36,838 [http-nio-8082-exec-9] [TRACE] (o.a.a.d.r.DockerRemoteTokenProvider:80) - Getting token for {service=10.128.0.151:8081, scope=repository:busybox:pull, realm=http://10.128.0.151:8081/artifactory/api/docker/docker-local/v2/token}

      2019-07-12 22:48:36,852 [http-nio-8082-exec-9] [INFO ] (o.a.r.HttpRepo      :432) - docker-test downloading http://10.128.0.151:8081/artifactory/api/docker/docker-local/v2/busybox/blobs/sha256:e4db68de4ff27c2adfea0c54bbb73a61a42f5b667c326de4d7d5b19ab71c6a3b 1.46 KB

      2019-07-12 22:48:36,870 [http-nio-8082-exec-9] [INFO ] (o.a.r.HttpRepo      :445) - docker-test downloaded  http://10.128.0.151:8081/artifactory/api/docker/docker-local/v2/busybox/blobs/sha256:e4db68de4ff27c2adfea0c54bbb73a61a42f5b667c326de4d7d5b19ab71c6a3b 1.46 KB at 83.77 KB/sec

      2019-07-12 22:48:36,905 [http-nio-8082-exec-9] [TRACE] (o.a.a.d.r.DockerPackageWorkContext:121) - Search Blob by sha256

      2019-07-12 22:48:36,930 [http-nio-8082-exec-9] [TRACE] (o.a.a.d.r.DockerRemoteTokenProvider:80) - Getting token for {service=10.128.0.151:8081, scope=repository:busybox:pull, realm=http://10.128.0.151:8081/artifactory/api/docker/docker-local/v2/token}

      2019-07-12 22:48:36,988 [http-nio-8082-exec-9] [DEBUG] (o.a.a.d.r.v.r.i.DockerRemoteInterceptor:142) - Resolved incoming manifest type 'application/vnd.docker.distribution.manifest.v1+prettyjws' for path 'docker-test/busybox/2.0.0/manifest.json'

       

       

      But however the manifest.json file of the busybox:2.0.0 is below:

      { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.v2+json", }

       

      And the error from the docker client is this:

      docker pull {Art Url}:8082/docker-test/busybox:2.0.0

      Error response from daemon: Bad response from Docker engine

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Dudim Dudi Morad (Inactive)
                Reporter:
                manojt Manoj Tuguru
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: