krill
krill copied to clipboard
Docker push fails for release tag
GitHub Actions workflow pkg run https://github.com/NLnetLabs/krill/actions/runs/2994084685 failed at the final step: docker-manifest.
Actually it failed earlier than that at the matrix of docker jobs but the steps themselves didn't fail, rather they pushed the created image to the wrong tag in Docker Hub. The manifest push step then failed because the separate component images didn't exist with the expected tags.
The root cause of this is two-fold:
-
Firstly, the
docker/metadata-action@v3returned multiple line-break separated tags fornlnetlabs/krill:v0.10.0andnlnetlabs/krill:latest. This didn't happen when the worfkflow was tested by forking this repo to theximon18/krillrepo because it only output a single tag for the version, it did not output the latest tag as well though I don't know why not. We should either get a single tag only or handle the line breaks. -
Secondly, the old
:latesttag needs to be replaced by a pushed manifest rather than a pushed tag. Unlike tags, a manifest can't be copied to a new name and pushed again. We therefore need to calldocker manifest createanddocker manifest pushtwice each, once for thenlnetlabs/krill:v0.10.0tag and once for thenlnetlabs/krill:latesttag.
I've fixed the issue manually for now by downloading the docker image tarballs from the failed workflow saved artifacts, building the manifests locally and pushing them to Docker Hub, as the alternative was a delay while working out how to fix the workflow and long delays testing and finally running the modifieid workflow. So the workflow still needs fixing to avoid this failure happening again.
A local test (after deleting all local nlnetlabs/krill images) shows all pushed tags/manifests working and reporting v0.10.0: (note: I stripped output showing image pulling to make it easier to see the result of the run command)
$ docker run -it --rm nlnetlabs/krill krillc --version
Krill Client 0.10.0
$ docker run -it --rm nlnetlabs/krill:latest krillc --version
Krill Client 0.10.0
$ docker run -it --rm nlnetlabs/krill:v0.10.0 krillc --version
Krill Client 0.10.0
$ docker images nlnetlabs/krill --format "{{.Repository}} {{.Tag}} {{.ID}} {{.CreatedAt}} {{.Size}} {{.Digest}}"
nlnetlabs/krill latest 8757e8a6b915 2022-09-05 17:10:16 +0200 CEST 74.5MB sha256:142cb6d303660ba8216a982535fc44986aebe99b1bea54140287a36725758535
nlnetlabs/krill v0.10.0 8757e8a6b915 2022-09-05 17:10:16 +0200 CEST 74.5MB sha256:142cb6d303660ba8216a982535fc44986aebe99b1bea54140287a36725758535
Notice that the image ID and sha256 digest values are the same for both locally available tags :v0.10.0 and :latest.
This issue is no longer occurring and was presumably resolved within Ploutos.