Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1528613 - Error pushing images with 3 levels of path, but filesystem directories are created
Error pushing images with 3 levels of path, but filesystem directories are cr...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry (Show other bugs)
3.5.1
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.9.0
Assigned To: Alexey Gladkov
Dongbo Yan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-12-22 06:58 EST by Sergi Jimenez Romero
Modified: 2018-03-28 10:16 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: There was no check of the number of components in the path. Consequence: The data was placed in the storage, but could not be written to the database. Fix: An early check of the path is added. Result: The bug is fixed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-03-28 10:16:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0489 None None None 2018-03-28 10:16 EDT

  None (edit)
Description Sergi Jimenez Romero 2017-12-22 06:58:20 EST
Description of problem:

When pushing images that contains 3 slashes in their names,  an error 500 is shown, but the image repository is created in the registry FileSystem.  


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

v3.5.5.31.24

How reproducible:
Always

Steps to Reproduce:
1. docker push registry.domain.tld/username-pusher/secondlevel/busybox:latest
2. received unexpected HTTP status: 500 Internal Server Error
3. oc -n default rsh docker-registry-16-wlg1c
4. ls -l /registry/docker/registry/v2/repositories/username-pusher/secondlevel/busybox


Actual results:

Filesystem directories are created.

Expected results:

Directories wouldn't be created.

Additional info:
Comment 1 Alexey Gladkov 2017-12-22 18:35:11 EST
The integrated registry does not support multi-slashes in the image name. And never will be.
Comment 2 Sergi Jimenez Romero 2018-01-08 08:55:46 EST
(In reply to Alexey Gladkov from comment #1)
> The integrated registry does not support multi-slashes in the image name.
> And never will be.

Alexey, thanks for the update, we do understand that, but why are the directories being created? I would assume that if I get an error while pushing the image with multi-slashes the directories wouldn't be created. That's what's being reported on this BZ.

Thanks.
Comment 3 Alexey Gladkov 2018-01-11 10:38:32 EST
> we do understand that, but why are the directories being created?

Good catch! Thanks!

https://github.com/openshift/image-registry/pull/45
Comment 4 Ben Parees 2018-01-12 13:10:23 EST
PR merged, moving to modified.
Comment 5 Sergi Jimenez Romero 2018-01-12 14:49:01 EST
Thanks Ben! I just updated the customer.
Comment 7 Dongbo Yan 2018-01-26 02:58:22 EST
Verified
openshift v3.9.0-0.24.0
kubernetes v1.9.1+a0ce1bc657
etcd 3.2.8

# docker push docker-registry-default.apps.com/dyan1/openshift3/pod:latest
The push refers to a repository [docker-registry-default.com/dyan1/openshift3/pod]
4cb898d8cb62: Preparing 
5f70bf18a086: Preparing 
unauthorized: repository name "dyan1/openshift3/pod" invalid: it must be of the format <project>/<name>
Comment 8 Dongbo Yan 2018-01-26 03:00:56 EST
this is fixed in ocp v3.9, please attach in right errata, remove from v3.5 errata.
thanks
Comment 13 errata-xmlrpc 2018-03-28 10:16:17 EDT
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-2018:0489

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