Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-27469

Using AzureBlobStore causes docker image upload failure with 'digest invalid' error.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.30.1
    • Fix Version/s: 3.32.0
    • Component/s: Azure, Docker
    • Labels:

      Description

      .When using AzureBlobstore for the docker group repo and attempting to push a docker image. It fails with the "digest invalid: provided digest did not match uploaded content" error

      Steps to reproduce the issue:

      Test-1)
      1). Create a Docker repo as following:

      docker-proxy
      docker-hosted   ----> http port 8082 (or any port)
      docker group     ----> http port 8083 (or any port)

      docker-hosted is the writable repository for the "docker-group" repo.

      2). Make sure that docker repos uses "Azure Cloude Storage" as blobstore.

      3). Create an image like following and try to push it.

      cd /Cases/Docker_Azure
      
      cat > Dockerfile << 'EOF'
      FROM nginx
      COPY html /usr/share/nginx/html
      EOF
      
      mkdir html
      touch html/a.html
      touch html/b.html
      
      docker login    master.example.com:8083 -u admin -p admin123
      docker build -t master.example.com:8083/test_image:1.0.0 .
      docker push     master.example.com:8083/test_image:1.0.0
      

      4). Try to push the image. It fails with 'digest invalid' error.

      # docker push master.example.com:8083/test_image:1.0.0
      The push refers to repository [master.example.com:8083/test_image]
       50b8383b2253: Pushing [==================================================>] 4.608kB
       64ee8c6d0de0: Pushing [==================================================>] 7.168kB
       974e9faf62f1: Pushing [==================================================>] 3.584kB
       15aac1be5f02: Pushing [==================================================>] 4.096kB
       23c959acc3d0: Pushing [==================================================>] 3.072kB
       4dc529e519c4: Waiting 
       7e718b9c0c8c: Waiting 
       digest invalid: provided digest did not match uploaded content
      

      Test-2)
      Remove "docker-hosted" repo from the docker-group repo and then add another docker hosted repo which uses Native blobstore.
      Then retest, same works without any issue when using "Native Blobstore"

      # docker push master.example.com:8083/test_image:1.0.0
      
      The push refers to repository [master.example.com:8083/test_image]
      50b8383b2253: Pushed 
      64ee8c6d0de0: Pushed 
      974e9faf62f1: Pushed 
      15aac1be5f02: Pushed 
      23c959acc3d0: Pushed 
      4dc529e519c4: Pushed 
      7e718b9c0c8c: Pushed 
      1.0.0: digest: sha256:be60a290abb713e77e59a6aef96ded8f146bb7c96d2362253f34d12f73e2777c size: 1777
      

      Expectation:

      • Blobstore type (Native blobstore / Azure Cloud Storage ...etc) should not matter/affect the docker image push.

        Attachments

          Activity

            People

            Assignee:
            jhill Joshua Hill
            Reporter:
            jsensharma Jay Kumar SenSharma
            CC:
            Ansgar Berhorn, Eric Engberg
            Last Updated By:
            Joshua Hill Joshua Hill
            Team:
            NXRM - Neo
            Votes:
            2 Vote for this issue
            Watchers:
            11 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title