OCI: Uploads of different arches to a registry overwrite one another
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:/
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:/
Related branches
- Colin Watson (community): Approve
-
Diff: 1057 lines (+607/-56)10 files modifieddatabase/schema/security.cfg (+1/-0)
lib/lp/oci/interfaces/ocirecipe.py (+10/-0)
lib/lp/oci/interfaces/ocirecipejob.py (+12/-0)
lib/lp/oci/interfaces/ociregistryclient.py (+3/-0)
lib/lp/oci/model/ocirecipe.py (+16/-1)
lib/lp/oci/model/ocirecipebuildjob.py (+117/-3)
lib/lp/oci/model/ocirecipejob.py (+12/-0)
lib/lp/oci/model/ociregistryclient.py (+92/-23)
lib/lp/oci/tests/test_ocirecipebuildjob.py (+249/-5)
lib/lp/oci/tests/test_ociregistryclient.py (+95/-24)
Changed in launchpad: | |
assignee: | nobody → Thiago F. Pappacena (pappacena) |
Changed in launchpad: | |
status: | Triaged → In Progress |
Changed in launchpad: | |
status: | In Progress → Fix Committed |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
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.