Bug 1625457 - Pull of image during docker build failed with "Cannot overwrite digest" for the same digest
Summary: Pull of image during docker build failed with "Cannot overwrite digest" for t...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.11.0
Assignee: Miloslav Trmač
QA Contact: weiwei jiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-05 02:32 UTC by Clayton Coleman
Modified: 2023-09-14 04:34 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The image pull implementation released a lock between checking whether an image with a specific digest has already been pulled and actually pulling it and recording the results. Consequence: Concurrent requests to pull the same image could result, depending on the specific timing, in some of them failing with an “error pulling image …: Cannot overwrite digest …” error message. Fix: Repeated attempts to record the same remote digest for the same locally pulled image are no longer treated as errors. Result: Concurrent requests to pull the same image no longer fail with the ”Cannot overwrite digest” error.
Clone Of:
: 1628262 (view as bug list)
Environment:
Last Closed: 2018-12-21 15:23:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Clayton Coleman 2018-09-05 02:32:52 UTC
Docker error when pulling an image - a 3.11 build of origin failed in

https://openshift-gce-devel.appspot.com/build/origin-ci-test/logs/branch-ci-origin-images/413/

with:

2018/09/04 23:43:29 Build deployer failed, printing logs:
Pulling image "docker-registry.default.svc:5000/ci-op-rn4204r8/pipeline@sha256:7ecadbdff313447670cf4b2ff21e827cf87d0f2df0d76f8273756f20dc9764a6" ...
error: error pulling image docker-registry.default.svc:5000/ci-op-rn4204r8/pipeline@sha256:7ecadbdff313447670cf4b2ff21e827cf87d0f2df0d76f8273756f20dc9764a6: Cannot overwrite digest sha256:7ecadbdff313447670cf4b2ff21e827cf87d0f2df0d76f8273756f20dc9764a6

What causes this?  If we're pulling by SHA we shouldn't get this error.  May need to talk to Docker team for details.

Comment 1 Ben Parees 2018-09-05 02:54:36 UTC
That error would have to be coming from the docker daemon (we're just pulling the image via the node's docker daemon), so starting w/ the containers team to tell us how this can happen.

It is either a docker bug, or it's an issue w/ the content the internal registry is serving.

Comment 2 Ben Parees 2018-09-05 02:58:40 UTC
Also what is the build that's happening here?

Is this a docker strategy build where the FROM is docker-registry.default.svc:5000/ci-op-rn4204r8/pipeline@sha256:7ecadbdff313447670cf4b2ff21e827cf87d0f2df0d76f8273756f20dc9764a6  ?

if not, what is the flow that is leading to the attempt to pull that image?  (how is the image reference by the buildconfig?)

Comment 5 W. Trevor King 2018-09-13 20:50:34 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1628262 has this (or at least something that looks very similar) as fixed in docker-1.13.1-75.git8633870.el7_5.  Maybe we need a version bump?

Comment 6 W. Trevor King 2018-09-13 20:57:20 UTC
This seems to be the upstream patch: https://github.com/moby/moby/pull/37781

Comment 7 Mrunal Patel 2018-09-17 16:36:23 UTC
It is merged here - https://github.com/projectatomic/docker/pull/321 and should be in docker -75 build.

Comment 9 Luke Meyer 2018-12-21 15:23:35 UTC
Closing bugs that were verified and targeted for GA but for some reason were not picked up by errata. This bug fix should be present in current 3.11 release content.

Comment 10 Red Hat Bugzilla 2023-09-14 04:34:10 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


Note You need to log in before you can comment on or make changes to this bug.