Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1450291

Summary: oadm prune fails with secured registry without giving much information
Product: OpenShift Container Platform Reporter: Jaspreet Kaur <jkaur>
Component: Image RegistryAssignee: Maciej Szulik <maszulik>
Status: CLOSED INSUFFICIENT_DATA QA Contact: ge liu <geliu>
Severity: high Docs Contact:
Priority: high    
Version: 3.5.0CC: aos-bugs, jkaur, jokerman, mmccomas, pweil
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-28 08:27:18 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:

Description Jaspreet Kaur 2017-05-12 07:50:34 UTC
Description of problem: oadm prune images fails with no error other than below logs :

error pruning blob "sha256:dd5c91fc27471f459dfcee54807375314071326e1825b4e07aeb19318a140a65": error sending request: malformed HTTP response "\x15\x03\x01\x00\x02\x02"
error pruning blob "sha256:43067ea94e58b7e4a3d08cd9c919bb2155b473b4f96f602075a3b2b34e94b89c": error sending request: malformed HTTP response "\x15\x03\x01\x00\x02\x02"
error pruning blob "sha256:0e13495fca3f10f33a0745b28eeb7c130c8ad07dc5027d79f43b01345649b578": error sending request: malformed HTTP response "\x15\x03\x01\x00\x02\x02"
error pruning blob "sha256:da41945bd408ebb76dc08de0bd4975f07a9bf6b6f2b28534de38e6d8e5db4670": error sending request: malformed HTTP response "\x15\x03\x01\x00\x02\x02"
error pruning blob "sha256:ea0d53160c3576b45980bbb44585e53b1a808344609c435948de40730161665d": error sending request: malformed HTTP response "\x15\x03\x01\x00\x02\x02"
error pruning blob "sha256:6a3df95f63c37b87f5dbe6aa8cda9c5b69877413cbb7ae2d8a50fa05b11c1da3": error sending request: malformed HTTP response "\x15\x03\x01\x00\x02\x02"
error pruning blob "sha256:1cad63c426be88510881f0d3caba2aa0f46623162b792f4a4a988d7240135c52": error sending request: malformed HTTP response "\x15\x03\x01\x00\x02\x02"
error pruning blob "sha256:506fb5c817ee928608ef7f95b844b2125365bb7ceaaaf3dfd3a7283428b755ad": error sending request: malformed HTTP response "\x15\x03\x01\x00\x02\x02"

which is kind of expected as https call failed. 

Also, checking the registry logs we see the error of permission denied  :

me="2017-05-10T14:53:45.50210756Z" level=error msg="response completed with error" err.code=unknown err.detail="error deleting blob \"sha256:3b84e6f2483a29ae40b9d206df39f7a78d1f9ce35d317b0f207612d71e7f667b\": filesystem: remove /registry/docker/registry/v2/blobs/sha256/3b/3b84e6f2483a29ae40b9d206df39f7a78d1f9ce35d317b0f207612d71e7f667b/data: permission denied" err.message="unknown error" go.version=go1.7.4 http.request.host="172.30.35.174:5000" http.request.id=59f37d46-43f2-41ce-bbf2-3fabcdd6d8ba http.request.method=DELETE http.request.remoteaddr="10.128.0.1:58470" http.request.uri="/admin/blobs/sha256:3b84e6f2483a29ae40b9d206df39f7a78d1f9ce35d317b0f207612d71e7f667b" http.request.useragent="oadm/v1.5.2+43a9be4 (linux/amd64) kubernetes/43a9be4" http.response.contenttype="application/json; charset=utf-8" http.response.duration=9.462309ms http.response.status=500 http.response.written=319 instance.id=9223c14a-2e78-419b-bdc2-32d459fd3baa openshift.auth.user=garbetr openshift.auth.userid=51454f84-0b5b-11e7-9c7c-0050569afd3b openshift.logger=registry vars.digest="sha256:3b84e6f2483a29ae40b9d206df39f7a78d1f9ce35d317b0f207612d71e7f667b" 
10.128.0.1 - - [10/May/2017:14:53:45 +0000] "DELETE /admin/blobs/sha256:3b84e6f2483a29ae40b9d206df39f7a78d1f9ce35d317b0f207612d71e7f667b HTTP/2.0" 500 319 "" "oadm/v1.5.2+43a9be4 (linux/amd64) kubernetes/43a9be4"


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results: It failed when pruning images


Expected results: It should have provided more information of what led to the failure.


Additional info:

Comment 4 Maciej Szulik 2017-05-30 10:35:58 UTC
1. I've created https://github.com/openshift/origin/pull/14405 to improve logging messages, including the one about https. 

2. Where's the registry data being kept, does the user running the registry is allowed to remove data from that storage, that's my first question. Additionally, there was an error that forbid removing data from registry, see 2nd NOTE in https://docs.openshift.org/latest/admin_guide/pruning_resources.html#pruning-images, which talks about setting torage:delete:enabled to true in registry config. You might want to check both of these.

Comment 5 Jaspreet Kaur 2017-05-30 10:39:32 UTC
Thanks for the update.

I will check this and get back to you.


(In reply to Maciej Szulik from comment #4)
> 1. I've created https://github.com/openshift/origin/pull/14405 to improve
> logging messages, including the one about https. 
> 
> 2. Where's the registry data being kept, does the user running the registry
> is allowed to remove data from that storage, that's my first question.
> Additionally, there was an error that forbid removing data from registry,
> see 2nd NOTE in
> https://docs.openshift.org/latest/admin_guide/pruning_resources.html#pruning-
> images, which talks about setting torage:delete:enabled to true in registry
> config. You might want to check both of these.

Comment 6 openshift-github-bot 2017-06-08 07:36:19 UTC
Commits pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/7edd2ba4247e29d4fb155b31d9d98ca20cd772d8
Bug 1450291 - Improve logs in image pruning

https://github.com/openshift/origin/commit/08cc91abe2b566c59fae33cbaca656dac694fccf
Merge pull request #14405 from soltysh/bug1450291

Merged by openshift-bot

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