OCI multiarch upload leads to temporary invalid manifest
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Tom Wardill |
Bug Description
I'm building a multiarch base OCI image. The build for the different archs takes a different amount of time to the web-ui for the OCI build shows under "upload status" the value "Partial".
And that's correct because (in my case) amd64 image got uploaded, arm64 is still building.
The problem is now, that (in my example) arm64 can not use the edge tag anymore because the image is not there:
$ docker pull --platform arm64 toabctl/
base-21.10_edge: Pulling from toabctl/ubtest2
no matching manifest for linux/arm64 in the manifest list entries
But amd64 works because the image is already there:
$ docker pull --platform amd64 toabctl/
base-21.10_edge: Pulling from toabctl/ubtest2
Digest: sha256:
Status: Image is up to date for toabctl/
docker.
So this is a race (which can be a very long race I think depending on the build/upload speed).
Here's the full manifest:
$ docker manifest inspect toabctl/
{
"schemaVersion": 2,
"mediaType": "application/
"manifests": [
{
"size": 446,
"digest": "sha256:
"os": "linux"
}
}
]
}
Related branches
- Colin Watson (community): Approve
-
Diff: 157 lines (+98/-9)2 files modifiedlib/lp/oci/model/ociregistryclient.py (+10/-8)
lib/lp/oci/tests/test_ociregistryclient.py (+88/-1)
tags: | added: oci |
Changed in launchpad: | |
status: | Triaged → In Progress |
assignee: | nobody → Tom Wardill (twom) |
Changed in launchpad: | |
status: | In Progress → Fix Released |
This gets more worse when one build worked and already pushed and another build failed (see eg. https:/ /launchpad. net/~cloud- images- release- managers/ cloud-images/ +oci/ubuntu- base/+recipe/ 21.04/ for an example and the attached screenshot where s390x failed to upload).
In that case, some architectures are uploaded to the target registry and others are not. That leads to an inconsistent state on the registry where some arch images are up-to-date and others are still old.