OCI: LP should use "ppc64le" for image manifests

Bug #1930094 reported by Sergio Durigan Junior
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Colin Watson

Bug Description

Our CI caught a problem with our ppc64el images, and after some investigation I noticed that the manifests for these images are being generated with "ppc64el" as one of the supported architectures. The problem is that docker doesn't recognize this arch; it expects to find "ppc64le".

More info about the supported architectures strings can be found here:

https://golang.org/doc/install/source#environment

(look for "$GOOS and $GOARCH")

LP should generate the correct architecture in the manifest so that "docker pull" can work correctly on ppc64el. I'm attaching an untested patch that should address this problem.

Thanks!

Tags: lp-oci

Related branches

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :
Colin Watson (cjwatson)
tags: added: lp-oci
Changed in launchpad:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

The patch I posted obviously doesn't take into account other architectures that might be affected as well.

Revision history for this message
Thomas Bechtold (toabctl) wrote :

arm is also affected:

Doing "docker manifest inspect ubuntu:latest" (that is *not* generated with LP) looks like:

     {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 943,
         "digest": "sha256:f070ebd4643c37026ed44149d67d92efa317e658b87246dc648470a238730860",
         "platform": {
            "architecture": "arm",
            "os": "linux",
            "variant": "v7"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 943,
         "digest": "sha256:f796dba8ac91e7995df05e0184761061581953152a6107c0e0e0895e6bb44893",
         "platform": {
            "architecture": "arm64",
            "os": "linux",
            "variant": "v8"
         }
      },

An image uploaded with launchpad ("docker manifest inspect toabctl/ubtest2:base-21.10_edge") looks like:

      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 446,
         "digest": "sha256:ad77ab275333cc1792ad8894781e056e6bc98d867ca37abdaaab2c1f4174a535",
         "platform": {
            "architecture": "armhf",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 446,
         "digest": "sha256:817124a24e257165f5b0a9db5cd1b7db4aad4138d2502955cd9482b81830a25d",
         "platform": {
            "architecture": "arm64",
            "os": "linux"
         }
      }

So 1) the "architecture" field is wrong and 2) the "variant" field is missing.

Colin Watson (cjwatson)
Changed in launchpad:
status: Triaged → In Progress
assignee: nobody → Colin Watson (cjwatson)
Colin Watson (cjwatson)
Changed in launchpad:
status: In Progress → Fix Committed
Colin Watson (cjwatson)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.