Bug 1766110 - [4.1.z] Cannot prune registry 'invalid resource name "psd2-anusha/psd2-anusha": [may not contain '/']'
Summary: [4.1.z] Cannot prune registry 'invalid resource name "psd2-anusha/psd2-anusha...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: 4.1.z
Assignee: Ricardo Maraschini
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On: 1749256 1755780 1766113
Blocks: 1752513
TreeView+ depends on / blocked
 
Reported: 2019-10-28 10:15 UTC by Ricardo Maraschini
Modified: 2020-01-08 18:18 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: older imagestreams could have an invalid name Consequence: image pruning failed because the specs for the imagestream's tags were not valid Fix: image pruner will always prune images if the associated imagestream has an invalid name Result: image pruning completes if imagestreams with invalid names are present
Clone Of: 1755780
Environment:
Last Closed: 2019-11-12 12:51:51 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift image-registry pull 198 'None' closed Bug 1766110: Checking if image name is valid, prune otherwise 2020-05-29 14:22:00 UTC
Red Hat Product Errata RHBA-2019:3766 None None None 2019-11-12 12:51:58 UTC

Comment 2 Wenjing Zheng 2019-11-06 10:15:48 UTC
Verified as below:
[wzheng@laptop 4.1]$ oc adm policy add-cluster-role-to-user system:image-pruner system:serviceaccount:openshift-image-registry:registry
clusterrole.rbac.authorization.k8s.io/system:image-pruner added: "system:serviceaccount:openshift-image-registry:registry"
[wzheng@laptop 4.1]$ oc exec image-registry-69559dcbf-znxk9 -- /bin/sh -c 'REGISTRY_LOG_LEVEL=info /usr/bin/dockerregistry -prune=check'
time="2019-11-06T10:14:50.371580922Z" level=info msg="start prune (dry-run mode)" distribution_version=v2.6.0+unknown go.version=go1.10.8 openshift_version=v4.1.23-201911050122+46aafb1-dirty
time="2019-11-06T10:14:50.80312252Z" level=info msg="The image stream openshift/ose-ansible-service-broker-operator is not found, will remove the whole repository" go.version=go1.10.8
time="2019-11-06T10:14:51.068764112Z" level=info msg="Invalid image name wzheng3/foo/ruby-ex, removing whole repository" go.version=go1.10.8
time="2019-11-06T10:14:51.068802923Z" level=info msg="Would delete repository: openshift/ose-ansible-service-broker-operator" go.version=go1.10.8
time="2019-11-06T10:14:51.169610414Z" level=info msg="Would delete repository: wzheng3/foo/ruby-ex" go.version=go1.10.8
time="2019-11-06T10:14:51.356342341Z" level=info msg="Would delete blob: sha256:5b1d8a575bd78b318457903c54b6ebfcd5b3079e1d3998a224b2abea72347b6a" go.version=go1.10.8
time="2019-11-06T10:14:51.525745537Z" level=info msg="Would delete blob: sha256:ac70db69091e7f1f731b2d3513be39f30b69629f4afd49db4347fc56e8ae30fd" go.version=go1.10.8
time="2019-11-06T10:14:51.643646152Z" level=info msg="Would delete blob: sha256:ee75b91b1e7ceab2901fbb9559e302fd961b26e68d63bae0d6f666801b62afbf" go.version=go1.10.8
Would delete 3 blobs
Would free up 3.374MiB of disk space
Use -prune=delete to actually delete the data
[wzheng@laptop 4.1]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.1.0-0.nightly-2019-11-05-091918   True        False         99m     Cluster version is 4.1.0-0.nightly-2019-11-05-091918

Comment 4 errata-xmlrpc 2019-11-12 12:51:51 UTC
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, 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/RHBA-2019:3766


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