Project

Profile

Help

Story #2993

As a user, I can upload a docker_manifest_list so that I can remove arches from a manifest list without performing a sync

Added by rmcgover 28 days ago. Updated 6 days ago.

Status:
NEW
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
% Done:

0%

Platform Release:
Blocks Release:
Target Release - Docker:
Backwards Incompatible:
No
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No

Description

I would like to be able to use Pulp's upload API to upload units of type docker_manifest_list.

Our use-case for this is removing selected arches from a manifest list.

For example: right now we can sync from a docker registry into Pulp and end up with a docker_manifest_list unit with content as in this sample:

{
  "schemaVersion": 2,
  "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
  "manifests": [
    {
      "mediaType": "application/vnd.docker.image.manifest.v2+json",
      "size": 7143,
      "digest": "sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f",
      "platform": {
        "architecture": "ppc64le",
        "os": "linux",
      }
    },
    {
      "mediaType": "application/vnd.docker.image.manifest.v2+json",
      "size": 7143,
      "digest": "sha256:49ae93732fcf8d63fe1cce759664982dbd5b23161f007dba8561862adc96d063",
      "platform": {
        "architecture": "aarch64",
        "os": "linux",
      }
    },
    {
      "mediaType": "application/vnd.docker.image.manifest.v2+json",
      "size": 7682,
      "digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270",
      "platform": {
        "architecture": "amd64",
        "os": "linux",
        "features": [
          "sse4" 
        ]
      }
    }
  ]
}

The source used for sync included three arches. But, our requirement is that we want to be able to choose any combination of those arches for publish, thus we may need to create a new manifest list.

To get the new manifest list into Pulp, what I would like to do is:

  • Download manifest list from Pulp
  • Make a new manifest list by removing the items from "manifests" with an unwanted architecture
  • Upload modified manifest list to Pulp
  • Now I can remove the original manifest list and manifests for the arches I don't want, leaving only desired arches

If the upload isn't possible then we're instead forced to do a slower and more complicated process to get the same result indirectly: create a new manifest list, push it to a docker registry, ask Pulp to sync from that registry.

History

#1 Updated by rmcgover 21 days ago

Would someone from Pulp team be able to have a look at this? I'm not asking for a target release or date, just to know whether you agree or disagree with this request in principle. If you think it's a bad idea then let me know so we can plan around it.

#2 Updated by ipanova@redhat.com 6 days ago

This is doable, we just need to highlight the fact that the 'upload of a new manifest list' needs to contain image manifests which are already in pulp, or for those images manifests which are not in pulp, first upload them with skopeo utility into pulp. In other words the upload of a new manifest list would not imply the automatic upload of the image manifests+blobs referenced inside of the list.

#3 Updated by rmcgover 6 days ago

Yep, that's what I'd expect.

One thing I'm not sure is how far the validation should go; for example:

    {
      "mediaType": "application/vnd.docker.image.manifest.v2+json",
      "size": 7143,
      "digest": "sha256:49ae93732fcf8d63fe1cce759664982dbd5b23161f007dba8561862adc96d063",
      "platform": {
        "architecture": "aarch64",
        "os": "linux",
      }
    },

If I try to upload that in manifest list then should Pulp also check if that manifest matches the given size and platform, and reject (fatal error) if there's a mismatch?

From my point of view such checks would be welcome but not a hard requirement.

Please register to edit this issue

Also available in: Atom PDF