OCI: Uploads of different arches to a registry overwrite one another

Bug #1894319 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Thiago F. Pappacena

Bug Description

It looks like if you have an OCI build recipe for multiple architectures, and then configure a push rule to a registry, LP will upload one arch on top of the other, until only the last upload remains published.

I don't know if this is registry-specific, but my use case is https://launchpad.net/~canonical-server/ubuntu-server-lma/+oci/grafana/+recipe/grafana-2 pushing to https://registry.hub.docker.com/repository/docker/ahasenack/grafana/general.

What I have observed is that for a moment there was a ppc64el digest published in my ahasenack/grafana repository, and then a moment later it was gone and replaced by an amd64 digest, which is what is there now.

Upstream grafana at https://registry.hub.docker.com/r/grafana/grafana/tags has multiple architectures published under the same tag, so it's doable.

Tags: oci

Related branches

Revision history for this message
Thiago F. Pappacena (pappacena) wrote :

Implementation detail: on Docker Registry HTTP API V2 (https://docs.docker.com/registry/spec/api/), "Multiple architecture support" is marked as "future", so it is not described how to do the images upload distinguishing the different architectures there.

Although it is not documented on the API, docker client has a way to do it, and it is well explained in this blog post: https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/

The general idea seems to be creating multiple manifests (one per arch) and "merging" them together.

Changed in launchpad:
status: New → Triaged
importance: Undecided → Critical
tags: added: oci
Colin Watson (cjwatson)
Changed in launchpad:
assignee: nobody → Thiago F. Pappacena (pappacena)
Changed in launchpad:
status: Triaged → In Progress
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.