-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release: attempt to fix docker manifest commands #367
Release: attempt to fix docker manifest commands #367
Conversation
030ddf5
to
fdbf22b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The failures of this reqs job coincide with the chances you are mostly reverting here so I think we are on the right track.
purge_previous_manifests "${registry}:${tag}" | ||
purge_previous_manifests "${registry}:latest" | ||
purge_previous_manifests ${registry}:${tag} | ||
purge_previous_manifests ${registry}:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dropping those doesn't seem like a good idea
"${registry}:${tag}" \ | ||
"${registry}:x86_64-${tag}" \ | ||
"${registry}:s390x-${tag}" | ||
docker manifest create ${extra_docker_manifest_flags} \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here it is a good idea to drop the ${extra_docker_manifest_flags}
quotes but keep the other ones
docker manifest create ${extra_docker_manifest_flags} \ | ||
${registry}:latest \ | ||
--amend ${registry}:x86_64-${tag} \ | ||
--amend ${registry}:s390x-${tag} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for the amend, I read it more carefully now and there are the purge_previous_manifests
commands to remove previously existing ones. So the --amend
should not be there (or we should remove the purge_previous_manifest
if you're sure the --amend
is supported on our builders).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, and I don't understand the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@portersrc I don't think the mass removal of quotes is necessary. Please remove only the extra_docker_manifest_flags
quotes and it should be good to go.
As for the --amend
, would you please either remove the purge commands (and functions) to utilize it, or just leave it without the --amend
(to utilize the custom cleanup)
Note I tested it locally with: diff --git a/install/pre-install-payload/payload.sh b/install/pre-install-payload/payload.sh
index 20c6057..345b2af 100755
--- a/install/pre-install-payload/payload.sh
+++ b/install/pre-install-payload/payload.sh
@@ -81,18 +81,18 @@ function build_payload() {
purge_previous_manifests "${registry}:${tag}"
purge_previous_manifests "${registry}:latest"
- docker manifest create "${extra_docker_manifest_flags}" \
+ docker manifest create ${extra_docker_manifest_flags} \
"${registry}:${tag}" \
- --amend "${registry}:x86_64-${tag}" \
- --amend "${registry}:s390x-${tag}"
+ "${registry}:x86_64-${tag}" \
+ "${registry}:s390x-${tag}"
- docker manifest create "${extra_docker_manifest_flags}" \
+ docker manifest create ${extra_docker_manifest_flags} \
"${registry}:latest" \
- --amend "${registry}:x86_64-${tag}" \
- --amend "${registry}:s390x-${tag}"
+ "${registry}:x86_64-${tag}" \
+ "${registry}:s390x-${tag}"
- docker manifest push "${extra_docker_manifest_flags}" "${registry}:${tag}"
- docker manifest push "${extra_docker_manifest_flags}" "${registry}:latest"
+ docker manifest push ${extra_docker_manifest_flags} "${registry}:${tag}"
+ docker manifest push ${extra_docker_manifest_flags} "${registry}:latest"
popd
} By running |
I think above is the only solution needed. The problem was introduced in commit ef55c2e when
I recommend to not remove |
fdbf22b
to
d0665c0
Compare
Okay, that's interesting. So the |
In general I feel more comfortable leaving them (since it was working before). |
This effectively reverts PR 366 and drops the guarding quotes around extra_docker_manifest_flags that were added to these commands in 351. The CI is still throwing an error to the effect of: "error parsing name for manifest list : invalid reference format". This seems to stem from an empty string in the command b/c of an empty extra_docker_manifest_flag variable. Hence, we are reverting quotes that were added around it in PR 351. Signed-off-by: Chris Porter <[email protected]>
d0665c0
to
13285e0
Compare
Hi @portersrc !
Cool! Tested like below and it worked out: $ export registry=quay.io/wainersm/reqs-payload
$ make reqs-image
coco_containerd_version=1.6.8.2 \
official_containerd_version=1.7.7 \
vfio_gpu_containerd_version=1.7.0.0 \
nydus_snapshotter_version=v0.13.11 \
bash -x payload.sh
+ set -o errexit
+ set -o pipefail
+ set -o nounset
+++ readlink -f payload.sh
++ dirname /home/wmoschet/src/github.com/confidential-containers/operator/install/pre-install-payload/payload.sh
+ script_dir=/home/wmoschet/src/github.com/confidential-containers/operator/install/pre-install-payload
+ coco_containerd_repo=https://github.com/confidential-containers/containerd
+ coco_containerd_version=1.6.8.2
+ official_containerd_repo=https://github.com/containerd/containerd
+ official_containerd_version=1.7.7
+ vfio_gpu_containerd_repo=https://github.com/confidential-containers/containerd
+ vfio_gpu_containerd_version=1.7.0.0
+ nydus_snapshotter_repo=https://github.com/containerd/nydus-snapshotter
+ nydus_snapshotter_version=v0.13.11
++ mktemp -d -t containerd-XXXXXXXXXX
+ containerd_dir=/tmp/containerd-5YOTyyqT1O/containerd
+ extra_docker_manifest_flags=
+ registry=quay.io/wainersm/reqs-payload
+ supported_arches=("linux/amd64" "linux/s390x")
+ main
+ build_payload
+ pushd /home/wmoschet/src/github.com/confidential-containers/operator/install/pre-install-payload
~/src/github.com/confidential-containers/operator/install/pre-install-payload ~/src/github.com/confidential-containers/operator/install/pre-install-payload
+ local tag
++ git rev-parse HEAD
+ tag=d0665c09a7258e8bc54b201690551fdeff3c34f7
+ for arch in "${supported_arches[@]}"
+ setup_env_for_arch linux/amd64
+ case "$1" in
+ kernel_arch=x86_64
+ golang_arch=amd64
+ echo 'Building containerd payload image for linux/amd64'
Building containerd payload image for linux/amd64
+ docker buildx build --build-arg ARCH=amd64 --build-arg COCO_CONTAINERD_VERSION=1.6.8.2 --build-arg COCO_CONTAINERD_REPO=https://github.com/confidential-containers/containerd --build-arg OFFICIAL_CONTAINERD_VERSION=1.7.7 --build-arg OFFICIAL_CONTAINERD_REPO=https://github.com/containerd/containerd --build-arg VFIO_GPU_CONTAINERD_VERSION=1.7.0.0 --build-arg VFIO_GPU_CONTAINERD_REPO=https://github.com/confidential-containers/containerd --build-arg NYDUS_SNAPSHOTTER_VERSION=v0.13.11 --build-arg NYDUS_SNAPSHOTTER_REPO=https://github.com/containerd/nydus-snapshotter -t quay.io/wainersm/reqs-payload:x86_64-d0665c09a7258e8bc54b201690551fdeff3c34f7 --platform=linux/amd64 --load .
SNIP
+ purge_previous_manifests quay.io/wainersm/reqs-payload:d0665c09a7258e8bc54b201690551fdeff3c34f7
+ local manifest
+ local sanitised_manifest
+ manifest=quay.io/wainersm/reqs-payload:d0665c09a7258e8bc54b201690551fdeff3c34f7
++ echo quay.io/wainersm/reqs-payload:d0665c09a7258e8bc54b201690551fdeff3c34f7
++ sed 's|/|_|g'
++ sed 's|:|-|g'
+ sanitised_manifest=quay.io_wainersm_reqs-payload-d0665c09a7258e8bc54b201690551fdeff3c34f7
+ rm -rf /home/wmoschet/.docker/manifests/quay.io_wainersm_reqs-payload-d0665c09a7258e8bc54b201690551fdeff3c34f7
+ purge_previous_manifests quay.io/wainersm/reqs-payload:latest
+ local manifest
+ local sanitised_manifest
+ manifest=quay.io/wainersm/reqs-payload:latest
++ echo quay.io/wainersm/reqs-payload:latest
++ sed 's|/|_|g'
++ sed 's|:|-|g'
+ sanitised_manifest=quay.io_wainersm_reqs-payload-latest
+ rm -rf /home/wmoschet/.docker/manifests/quay.io_wainersm_reqs-payload-latest
+ docker manifest create quay.io/wainersm/reqs-payload:d0665c09a7258e8bc54b201690551fdeff3c34f7 --amend quay.io/wainersm/reqs-payload:x86_64-d0665c09a7258e8bc54b201690551fdeff3c34f7 --amend quay.io/wainersm/reqs-payload:s390x-d0665c09a7258e8bc54b201690551fdeff3c34f7
Created manifest list quay.io/wainersm/reqs-payload:d0665c09a7258e8bc54b201690551fdeff3c34f7
+ docker manifest create quay.io/wainersm/reqs-payload:latest --amend quay.io/wainersm/reqs-payload:x86_64-d0665c09a7258e8bc54b201690551fdeff3c34f7 --amend quay.io/wainersm/reqs-payload:s390x-d0665c09a7258e8bc54b201690551fdeff3c34f7
Created manifest list quay.io/wainersm/reqs-payload:latest
+ docker manifest push quay.io/wainersm/reqs-payload:d0665c09a7258e8bc54b201690551fdeff3c34f7
sha256:d19de01c4672f03729546646c013226e769ee4b5fa07f12c0b2fde2bfd860cac
+ docker manifest push quay.io/wainersm/reqs-payload:latest
sha256:d19de01c4672f03729546646c013226e769ee4b5fa07f12c0b2fde2bfd860cac
+ popd
~/src/github.com/confidential-containers/operator/install/pre-install-payload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for this fix as well @portersrc !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, looks good now. The nit-picky version of me would argue about using git revert
to restore the --amend
but let's get this in as is.
This effectively reverts PR 366 and drops the guarding quotes that were added around
extra_docker_manifest_flags
in 351.