Description of problem: The build push prints a "Successfully pushed" message even if the actual image push fails. Version-Release number of selected component (if applicable): v4u7 How reproducible: Easy Steps to Reproduce: --- $ oc patch configs.imageregistry.operator.openshift.io/cluster --patch '{"spec":{"managementState":"Managed"}}' --type=merge $ oc new-project foo $ cat < EOF | oc create -f - apiVersion: image.openshift.io/v1 kind: ImageStream metadata: name: busybox --- apiVersion: v1 kind: BuildConfig metadata: name: busybox spec: output: to: kind: ImageStreamTag name: busybox:latest source: type: Dockerfile dockerfile: |- FROM k8s.gcr.io/busybox ENTRYPOINT ["sleep", "6000"] strategy: dockerStrategy: from: kind: DockerImage name: k8s.gcr.io/busybox type: Docker triggers: - imageChange: {} type: ImageChange EOF $ oc start-build busybox --wait=true --follow=true --- Actual results: The output print a "Successfully pushed" message even if the image push fails. --- Pushing image image-registry.openshift-image-registry.svc:5000/foo/busybox:latest ... Getting image source signatures Successfully pushed image-registry.openshift-image-registry.svc:5000/foo/busybox:latest Warning: Push failed, retrying in 5s ... Getting image source signatures Successfully pushed image-registry.openshift-image-registry.svc:5000/foo/busybox:latest Warning: Push failed, retrying in 5s ... Getting image source signatures Successfully pushed image-registry.openshift-image-registry.svc:5000/foo/busybox:latest Warning: Push failed, retrying in 5s ... error: build error: Failed to push image: error copying layers and metadata from "containers-storage:[overlay@/var/lib/containers/storage+/var/run/containers/storage:overlay.imagestore=/var/lib/shared]image-registry.openshift-image-registry.svc:5000/foo/busybox:latest" to "docker://image-registry.openshift-image-registry.svc:5000/foo/busybox:latest": Error trying to reuse blob sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4 at destination: error pinging docker registry image-registry.openshift-image-registry.svc:5000: Get "https://image-registry.openshift-image-registry.svc:5000/v2/": dial tcp: lookup image-registry.openshift-image-registry.svc on 172.30.0.10:53: no such host --- Expected results: It should not print a "Successfully pushed" message. Additional info:
No 'Successfully pushed' message shown when image push failed. Writing manifest to image destination Storing signatures --> d5b6e2ad097 d5b6e2ad097090fe73fe25e5b6d8e427331e3c3021fddc6911d6bb3fa7332ff5 Pushing image image-registry.openshift-image-registry.svc:5000/xiuwang/ruby-hello-world:latest ... Getting image source signatures Warning: Push failed, retrying in 5s ... Getting image source signatures Warning: Push failed, retrying in 5s ... Getting image source signatures Warning: Push failed, retrying in 5s ... Registry server Address: Registry server User Name: serviceaccount Registry server Email: serviceaccount Registry server Password: <<non-empty>> error: build error: Failed to push image: error copying layers and metadata from "containers-storage:[overlay@/var/lib/containers/storage+/var/run/containers/storage:overlay.imagestore=/var/lib/shared]image-registry.openshift-image-registry.svc:5000/xiuwang/ruby-hello-world:latest" to "docker://image-registry.openshift-image-registry.svc:5000/xiuwang/ruby-hello-world:latest": Error trying to reuse blob sha256:b77f42d650dc7d0d6fa21f8661f03957cfe70fcf92e48245d2a7cad7d795eb56 at destination: error pinging docker registry image-registry.openshift-image-registry.svc:5000: Get "https://image-registry.openshift-image-registry.svc:5000/v2/": dial tcp 172.30.60.102:5000: connect: connection refused
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:2438