Skip to content
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

RHCOS 4.11 x86_64: pushing oscontainer started failing #847

Closed
miabbott opened this issue Jun 14, 2022 · 4 comments · Fixed by coreos/coreos-assembler#2917 or coreos/coreos-assembler#2925

Comments

@miabbott
Copy link
Member

miabbott commented Jun 14, 2022

Seeing the following:

[Pipeline] sh
+ cosa push-container --format v2s2 --base-image quay.io/openshift-release-dev/ocp-v4.0-art-dev
skopeo copy --authfile /srv/.reg/..2022_06_14_10_18_47.895472488/docker.json --format v2s2 --digestfile=/home/jenkins/agent/workspace/rhcos-art/rhcos-art-rhcos-4.11/tmp/push-container-digestfileff8e6izc oci-archive:builds/411.86.202206141020-0/x86_64/rhcos-411.86.202206141020-0-ostree.x86_64.ociarchive docker://quay.io/openshift-release-dev/ocp-v4.0-art-dev-base-image
Getting image source signatures
time="2022-06-14T11:26:09Z" level=fatal msg="trying to reuse blob sha256:b624eae845d9d661e55983e728dcd8fa3da8f57d88b26106af68a84947b8ec75 at destination: checking whether a blob sha256:b624eae845d9d661e55983e728dcd8fa3da8f57d88b26106af68a84947b8ec75 exists in quay.io/openshift-release-dev/ocp-v4.0-art-dev-base-image: unauthorized: authentication required"
Traceback (most recent call last):
  File "/usr/lib/coreos-assembler/cmd-push-container", line 60, in <module>
    subprocess.check_call(skopeoargs)
  File "/usr/lib64/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['skopeo', 'copy', '--authfile', '/srv/.reg/..2022_06_14_10_18_47.895472488/docker.json', '--format', 'v2s2', '--digestfile=/home/jenkins/agent/workspace/rhcos-art/rhcos-art-rhcos-4.11/tmp/push-container-digestfileff8e6izc', 'oci-archive:builds/411.86.202206141020-0/x86_64/rhcos-411.86.202206141020-0-ostree.x86_64.ociarchive', 'docker://quay.io/openshift-release-dev/ocp-v4.0-art-dev-base-image']' returned non-zero exit status 1.

Looking at the last successful oscontainer push, it was using coreos/coreos-assembler@22a85ec.

Started to fail with coreos/coreos-assembler@4a6477e

Looks like fallout from coreos/coreos-assembler#2907

cc: @cgwalters

@ravanelli
Copy link
Member

The image is missing the RHCOS version. It is trying to push to quay.io/openshift-release-dev/ocp-v4.0-art-dev-base-image instead of quay.io/openshift-release-dev/ocp-v4.0-art-dev-411.86.202206141020-0-x86_64-base-image

Seems some issue when we try to create the tag using tag = ":${build[0]}-baseimage in the internal gitlab repo (upshift/osbuild.groovy#L456). The build[0] looks to be empty

@cgwalters
Copy link
Member

PR in coreos/coreos-assembler#2917

cgwalters added a commit to coreos/coreos-assembler that referenced this issue Jun 14, 2022
@miabbott
Copy link
Member Author

Looks like the new --name-suffix behavior from coreos/coreos-assembler#2923 is not the same as the --base-image behavior as before.

The --base-image behavior was adding the extra string to the tag:

+ cosa push-container --format v2s2 --base-image quay.io/openshift-release-dev/ocp-v4.0-art-dev
skopeo copy --authfile /srv/.reg/..2022_06_13_14_31_37.581779626/docker.json --format v2s2 oci-archive:builds/411.86.202206131434-0/x86_64/rhcos-411.86.202206131434-0-ostree.x86_64.ociarchive docker://quay.io/openshift-release-dev/ocp-v4.0-art-dev:411.86.202206131434-0-x86_64-base-image

The --name-suffix behavior is appending the string to the image name:

+ cosa push-container --format=v2s2 --name-suffix=base-image quay.io/openshift-release-dev/ocp-v4.0-art-dev
skopeo copy --authfile /srv/.reg/..2022_06_15_07_58_57.057068507/docker.json --format v2s2 --digestfile=/home/jenkins/agent/workspace/rhcos-art/rhcos-art-rhcos-4.11/tmp/push-container-digestfile_nhyy4f0 oci-archive:builds/411.86.202206150800-0/x86_64/rhcos-411.86.202206150800-0-ostree.x86_64.ociarchive docker://quay.io/openshift-release-dev/ocp-v4.0-art-dev-base-image:411.86.202206150800-0-x86_64

This is causing the downstream RHCOS pipeline to fail.

cc: @jlebon

@miabbott miabbott reopened this Jun 15, 2022
jlebon added a commit to jlebon/coreos-assembler that referenced this issue Jun 15, 2022
I misunderstood the original intent of this switch while reworking it.
The idea is to add a suffix to the image tag, not its name.

Fix it, and rename the switch accordingly.

While we're here, add a metavar to `name` to make it clear that an
optional tag can also be provided.

Fixes c462739 ("cmd-push-container: replace --base-image-name by
--name-suffix").

Closes: openshift/os#847
@jlebon
Copy link
Member

jlebon commented Jun 15, 2022

cgwalters pushed a commit to coreos/coreos-assembler that referenced this issue Jun 15, 2022
I misunderstood the original intent of this switch while reworking it.
The idea is to add a suffix to the image tag, not its name.

Fix it, and rename the switch accordingly.

While we're here, add a metavar to `name` to make it clear that an
optional tag can also be provided.

Fixes c462739 ("cmd-push-container: replace --base-image-name by
--name-suffix").

Closes: openshift/os#847
jlebon added a commit to jlebon/coreos-assembler that referenced this issue Jun 15, 2022
I misunderstood the original intent of this switch while reworking it.
The idea is to add a suffix to the image tag, not its name.

Fix it, and rename the switch accordingly.

While we're here, add a metavar to `name` to make it clear that an
optional tag can also be provided.

Fixes c462739 ("cmd-push-container: replace --base-image-name by
--name-suffix").

Closes: openshift/os#847
(cherry picked from commit 8015204)
jlebon added a commit to jlebon/coreos-assembler that referenced this issue Jun 15, 2022
I misunderstood the original intent of this switch while reworking it.
The idea is to add a suffix to the image tag, not its name.

Fix it, and rename the switch accordingly.

While we're here, add a metavar to `name` to make it clear that an
optional tag can also be provided.

Fixes c462739 ("cmd-push-container: replace --base-image-name by
--name-suffix").

Closes: openshift/os#847
(cherry picked from commit 8015204)
cgwalters pushed a commit to coreos/coreos-assembler that referenced this issue Jun 15, 2022
I misunderstood the original intent of this switch while reworking it.
The idea is to add a suffix to the image tag, not its name.

Fix it, and rename the switch accordingly.

While we're here, add a metavar to `name` to make it clear that an
optional tag can also be provided.

Fixes c462739 ("cmd-push-container: replace --base-image-name by
--name-suffix").

Closes: openshift/os#847
(cherry picked from commit 8015204)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants