Project

Profile

Help

Issue #3118

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

Added by jsherril@redhat.com over 2 years ago. Updated 11 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Severity:
2. Medium
Version - Docker:
Platform Release:
2.15.1
Blocks Release:
2.14.z
Target Release - Docker:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 30

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

Associated revisions

Revision d3b6055e View on GitHub
Added by ipanova@redhat.com about 2 years ago

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

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

Revision d3b6055e View on GitHub
Added by ipanova@redhat.com about 2 years ago

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

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

Revision d3b6055e View on GitHub
Added by ipanova@redhat.com about 2 years ago

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

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

Revision d3b6055e View on GitHub
Added by ipanova@redhat.com about 2 years ago

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

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

Revision 6c794a57 View on GitHub
Added by ipanova@redhat.com about 2 years ago

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

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

(cherry picked from commit d3b6055e68f6d00d5b272266bc16a00b00e200b3)

Revision 6c794a57 View on GitHub
Added by ipanova@redhat.com about 2 years ago

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

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

(cherry picked from commit d3b6055e68f6d00d5b272266bc16a00b00e200b3)

History

#2 Updated by tomckay@redhat.com over 2 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.)

#3 Updated by dalley over 2 years ago

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

#4 Updated by ipanova@redhat.com over 2 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

#5 Updated by rchan about 2 years ago

  • Sprint/Milestone changed from 47 to 48

#7 Updated by ipanova@redhat.com about 2 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.

#8 Updated by ipanova@redhat.com about 2 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

#9 Updated by ipanova@redhat.com about 2 years ago

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

#10 Updated by rchan about 2 years ago

  • Sprint/Milestone changed from 48 to 52

#11 Updated by ipanova@redhat.com about 2 years ago

  • Status changed from ASSIGNED to POST

#12 Updated by ipanova@redhat.com about 2 years ago

  • Status changed from POST to MODIFIED

#13 Updated by pcreech about 2 years ago

  • Platform Release set to 2.15.1

#15 Updated by pcreech about 2 years ago

  • Status changed from MODIFIED to ON_QA

#16 Updated by pcreech about 2 years ago

  • Status changed from ON_QA to CLOSED - CURRENTRELEASE

#17 Updated by bmbouter almost 2 years ago

  • Sprint set to Sprint 30

#18 Updated by bmbouter almost 2 years ago

  • Sprint/Milestone deleted (52)

#19 Updated by bmbouter 11 months ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF