Bug 1411162

Summary: [3.2] Fail to push built image to registry due to "manifest blob unknown: blob unknown to registry" without define output image via oc new-build
Product: OpenShift Container Platform Reporter: Scott Dodson <sdodson>
Component: Image RegistryAssignee: Alexey Gladkov <agladkov>
Status: CLOSED WONTFIX QA Contact: Wenjing Zheng <wzheng>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.2.1CC: agladkov, aos-bugs, bparees, haowang, mfojtik, sdodson, tdawson, wsun, wzheng, xtian, yinzhou
Target Milestone: ---   
Target Release: 3.2.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: We pass all requests (including HEAD) to the remote service if the pullthrough is enabled. On the other hand when docker client pushes the manifest we check the presence of all these layers locally. The client checks a blob existance by HEAD request before sending it to the server. If client image is based on the imported image (but not present in local registry) dockerregistry will say that it has all the layers from the base image. In this case docker client never send them to server, but manifest verification requires them locally. It means that the verification will always fail for remote layers. Fix: Manifest verification must to take into account the possibility that the layers may not be local and check them on remote registry server before before give up. We can't use pullthroughBlobStore because verification happens in ManifestService. So we need to move common code that gets the blobs from the remote server to BlobGetterService and use it for pullthrough and for verification.
Story Points: ---
Clone Of: 1408661 Environment:
Last Closed: 2017-03-02 14:49:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1408661    
Bug Blocks: 1411161    

Comment 3 Wenjing Zheng 2017-02-03 06:26:36 UTC
Can reproduce with 3.2 as below:
[root@openshift-130 ~]# oc logs builds/centos-1
I0203 06:06:47.924209       1 builder.go:57] Master version "v3.2.1.23", Builder version "v3.2.1.23"
I0203 06:06:47.947773       1 builder.go:145] Running build with cgroup limits: api.CGroupLimits{MemoryLimitBytes:92233720368547, CPUShares:2, CPUPeriod:100000, CPUQuota:-1, MemorySwap:92233720368547}
Step 1 : FROM centos@sha256:71574605afb91eb5adb332fd73e4baff2fc7b1bed8364cfe018b28ccdf0e76f3
Trying to pull repository registry.access.redhat.com/centos ... 
Trying to pull repository docker.io/library/centos ... 
F0203 06:06:50.434471       1 builder.go:204] Error: build error: manifest unknown: manifest unknown
[root@openshift-130 ~]# openshift version
openshift v3.2.1.23
kubernetes v1.2.0-36-g4a3f9c5
etcd 2.2.5

Comment 4 Alexey Gladkov 2017-02-08 12:58:09 UTC
what docker version are you using ?

Comment 5 Wenjing Zheng 2017-02-09 02:11:45 UTC
Here is my docker version:
# docker version
Client:
 Version:         1.12.5
 API version:     1.24
 Package version: docker-common-1.12.5-14.el7.x86_64
 Go version:      go1.7.4
 Git commit:      047e51b/1.12.5
 Built:           Wed Jan 11 17:53:20 2017
 OS/Arch:         linux/amd64

Server:
 Version:         1.12.5
 API version:     1.24
 Package version: docker-common-1.12.5-14.el7.x86_64
 Go version:      go1.7.4
 Git commit:      047e51b/1.12.5
 Built:           Wed Jan 11 17:53:20 2017
 OS/Arch:         linux/amd64