Project

Profile

Help

Issue #3118

closed

cannot create docker repository with repo-registry-id containing "--" or "__"

Added by jsherril@redhat.com about 7 years ago. Updated over 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Docker:
Platform Release:
2.15.1
Target Release - Docker:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 30
Quarter:

Description

pulp-admin docker repo create --repo-id=docker-foo6 --repo-registry-id="foo--foo"

A validation error occurred.

The value specified for repo-registry-id: 'foo--foo' is invalid. Registry id
must contain only lower case letters, integers, hyphens, periods, and may
include a single slash.

This worked on pulp 2.8, but is no longer working. Ina blamed this commit for breaking it: https://github.com/pulp/pulp_docker/commit/c9cce34beef567d3a37048e04e8e7c20ff7d9ddc

Actions #2

Updated by tomckay@redhat.com about 7 years ago

I commented on the BZ but perhaps discussion here is better.

Due to previous versions of katello having names that will violate this regexp, perhaps the best solution is to make the validation optional. It could be on by default in pulp itself but overridden by katello. In this way katello could optionally and incrementally enforce validation in its frontend. (Going forward, some way to better customize the registry names is needed by katello.)

Actions #3

Updated by dalley about 7 years ago

  • Priority changed from Normal to High
  • Sprint/Milestone set to 47
  • Triaged changed from No to Yes
Actions #4

Updated by ipanova@redhat.com about 7 years ago

from irc discussion:

(04:59:43 PM) ipanova: asmacdo: we have 2 options 1) be close as possible to docker specs, but because previously he had a bug which allowed more things and was not matching docker specs some of the repos would break after the upgrade 2) we relax validation to how it was previously but we are not conform docker specs.
(05:32:49 PM) mhrivnak: Is there discussion or reference somewhere about how allow "--" was a bug?
(05:50:18 PM) ipanova: it was a bug because we had wrong regexpr not conforming docker specs of which we came aware just now
Actions #5

Updated by rchan about 7 years ago

  • Sprint/Milestone changed from 47 to 48
Actions #7

Updated by ipanova@redhat.com almost 7 years ago

I did some more research, unfortunately we will need to match the exact regexp specified in the docker specs, otherwise the client will just refuse to pull from such repos. This is a requirement for v2 protocol and it should be followed because this regexp is used in docker registry api same for docker client code.

Actions #8

Updated by ipanova@redhat.com almost 7 years ago

Update:

i looked into the docker code, turns out they changed the regexp without updating the docs.
https://github.com/docker/distribution/commit/6bd5b8c24e66ba67a54541d72f1ad8d5cc17e677#diff-1a3e973fb67c04d3672d188529c6afcdR14

I disabled the validation in pulp, and checked that the client with docker pull is able to fetch from repositories:
foo-foo
foo--foo
foo_foo
foo__foo

I hope you won't need to use triple underscore because that does not work.

docker pull localhost:1234/aaa___aaa
Error parsing reference: "localhost:1234/aaa___aaa" is not a valid repository/tag

Next steps:
1) update regexp in pulp to match the one i found in the docker CODE
2) as a bonus report a docs issue to docker/distribution so they would update the docs and not confuse poor people

Actions #9

Updated by ipanova@redhat.com almost 7 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ipanova@redhat.com
Actions #10

Updated by rchan almost 7 years ago

  • Sprint/Milestone changed from 48 to 52
Actions #11

Updated by ipanova@redhat.com almost 7 years ago

  • Status changed from ASSIGNED to POST

Added by ipanova@redhat.com almost 7 years ago

Revision d3b6055e | View on GitHub

Update regexp so it would allow repeated dash and double underscore.

closes #3118 https://pulp.plan.io/issues/3118

Added by ipanova@redhat.com almost 7 years ago

Revision d3b6055e | View on GitHub

Update regexp so it would allow repeated dash and double underscore.

closes #3118 https://pulp.plan.io/issues/3118

Added by ipanova@redhat.com almost 7 years ago

Revision d3b6055e | View on GitHub

Update regexp so it would allow repeated dash and double underscore.

closes #3118 https://pulp.plan.io/issues/3118

Added by ipanova@redhat.com almost 7 years ago

Revision d3b6055e | View on GitHub

Update regexp so it would allow repeated dash and double underscore.

closes #3118 https://pulp.plan.io/issues/3118

Actions #12

Updated by ipanova@redhat.com almost 7 years ago

  • Status changed from POST to MODIFIED
Actions #13

Updated by pcreech almost 7 years ago

  • Platform Release set to 2.15.1

Added by ipanova@redhat.com almost 7 years ago

Revision 6c794a57 | View on GitHub

Update regexp so it would allow repeated dash and double underscore.

closes #3118 https://pulp.plan.io/issues/3118

(cherry picked from commit d3b6055e68f6d00d5b272266bc16a00b00e200b3)

Added by ipanova@redhat.com almost 7 years ago

Revision 6c794a57 | View on GitHub

Update regexp so it would allow repeated dash and double underscore.

closes #3118 https://pulp.plan.io/issues/3118

(cherry picked from commit d3b6055e68f6d00d5b272266bc16a00b00e200b3)

Actions #15

Updated by pcreech almost 7 years ago

  • Status changed from MODIFIED to 5
Actions #16

Updated by pcreech almost 7 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #17

Updated by bmbouter over 6 years ago

  • Sprint set to Sprint 30
Actions #18

Updated by bmbouter over 6 years ago

  • Sprint/Milestone deleted (52)
Actions #19

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF